Alert-prompt accepting numbers only


#1

Hi All,

Does anyone know how to make sure and alert-prompt can be made to only accept numbers?

By default it can accept free text.

Thanks


#2

I’m looking for this also.
The most I can do now is set the inputs to “tel” so on both iOS and Android numeric keyboards are shown…
But the users can still copy and paste or somehow trick it.


#3

I was reading the link you sent, there is an example that he uses type as password.

  {
    name: 'password',
    placeholder: 'Password',
    type: 'password'
  }

And in the input options you have

Property type
Type string
Description: The type the input should be: text, tel, number, etc.

Have you tried the type option set to number? It should work… I can’t test it right now, but its worth a try.