Setting a WebTextField to Number doesn't restrict input in Safari

Setting a WebTextField to Field Type = Number doesn’t restrict the input to numeric only as expected, when opening the web app using Safari I can type any character and the control accepts it. It works in Chrome except for the fact that on Chrome it will accept a single letter “e” as input.
Any ideas how I can restrict the input to numeric only?
Any thoughts are appreciated.

FieldType is a suggestion to the browser for the input controls type. Number can make a stepper appear, or on mobile change the keypad to a numberpad. It’s not an input-restriction, and it’s completely up to the browser if it does anything at all.

You’ll need Javascript to limit the input.

2 Likes

You are right. I was hoping for the magic Xojo feature that would do that for me. I should re-read what I posted some weeks ago about embracing JS when it comes to Web development.