samedi 28 février 2015

HTML5: additional chars in input with type="number" extending mobile keyboards

In our app, we have many inputs that are used to fill in school grades. Till now we had



<input type="text" name="mark">


As we're trying to use new features of HTML5, we changed it to



<input type="number" name="mark">


so on mobiles/tablets we have interface with only numbers. And there's the case. It is possible to place in input grades like "5+" and others (for example some two-letter shortcuts "ab" and other). It's customizable by users.


Is there any way to extend input to treat numbers and all that chars as valid WITH extending Android/iOS keyboard layout to only that?


EDIT:


Don't forget that i want to know if i can extend keyboard layout on mobile. If it's not possible, i'll fall back to text with some validation.


Another EDIT:


Is there any markup i can add, that let's mobile users to easily switch between keyboard layouts? That should be enough.


Aucun commentaire:

Enregistrer un commentaire