vendredi 1 septembre 2017

HTML input type number format large number. Introducing space or other separator

I am presenting the user on one device with a large number, like this:

123 879 233 223 211 782 782 

The numbers are presented in chunks of three, as can be seen.

Now the user is supposed to enter these numbers on another device.

I would like to present them the same way as he/she are typing them.

So I CURRENTLY have a

  input type=number pattern='\d*'

I would like it to basically be (pseudo) :

 type=text keyboard=numbers pattern='[0-9]{3}[0-9]{3} ...' 

The type number is useful on mobile devices because it brings up the numbers keypad only which in this case is more relevant and user friendly.

1) Is there a way to get the numbers keyboard for a standard input type=text?

2) If not, is there a way to format the numbers entered into the numbers input field?

3) If not, can we fire all people involved with W3C due to incompetence? Rather than keeping the input type=text they could have introduced pattern allowed on that, and allowed for an attribute that says, keyboard=numbers.




Aucun commentaire:

Enregistrer un commentaire