Can I force numeric input on a mobile browser?
March 16, 2008 1:50 AM   Subscribe

I'm developing a web site to be accessible by mobile phone. One of the key requirements is data input into a form that is submitted back to the server. This has been developed and works fine. One of the features of my K610i Sony Ericsson mobile phone is text prediction or auto completion of words. This is a good feature on the text fields, but some fields only require integer or floats (e.g., 12.34567). Integers can be input by either holding down each key for a full second, or by switching the "Writing language" to "123..." (i.e., integer input). Both approaches add a few seconds to the input process, but I'd like to make this is quick as possible. My question is: Is there a way, perhaps with a tag on the form field, to force my mobile browser to switch to the integer input for those fields? Do other phone brands (Nokia, Siemens) do this differently? Would a third party mobile browser, such as Opera, handle this somehow?
posted by chrisch to Computers & Internet (3 answers total) 2 users marked this as a favorite
 
can you use javascript? my first thought is to accept the letters & convert them to the numerals with javascript.
posted by duckstab at 5:07 AM on March 16, 2008


Response by poster: Thanks for the wap-input-format CSS rule; that's a new one to me. It almost works by forcing my mobile browser to use the numeric input, but unfortunately I don't see a way of setting a mask for floats in the format: -12.34567.
posted by chrisch at 12:48 PM on March 16, 2008


Response by poster: You're right! The *n mask works perfectly! Thanks!
posted by chrisch at 10:19 PM on March 16, 2008


« Older What was the name of the witch's hat in Scarios?   |   What to do about HPV-51 infection? Newer »
This thread is closed to new comments.