Can you give a hint to your mobile device that the HTML input field is numeric?

I tested usability on a website that I am developing using an Android phone and iPod touch. In both cases, when you enter a number field (time, distance in meters, etc.), I have to perform a manual step to change the keyboard layout to display numbers. Since the application will only accept numeric values ​​in the text box, I would like to save the inconvenience of the user and tell the device to "switch to the numeric keypad for this input."

Is it possible?

+5
source share
1 answer

After some review, HTML 5 offers some answers to this question, although they are not widely supported.

In particular, input of a numeric type :

<input type="number" min="0" max="10" step="2" value="6"> 

Here is a demo . Powered by Chrome 6.0.472.51 (beta). It remains to be tested on Android / iPhone, but apparently it works.


(source: wearehugh.com )

+6
source

All Articles