I don’t think that is something you can do in a webview.
If you are trying to ensure only numbers get submitted in your form then restricting the keyboard is not a good way to do this as users would still be able to copy and paste text they have in their clipboard. A better approach would be to do form validation or filter non-numbers as the user types.