I'm working on a mobile phone web app and I have several text fields that could benefit from iPhone's will adjust the keyboard for the user but I'm worried about breaking backwards compatability. What I'm hoping is that browsers/phone that support this can assist the user and other browser will fall back to a standard text field? Is this an acceptable practice? Does it even work?
+3
A:
Browsers will fall back to type="text" when they encounter unsupported input type. So I think it's OK to use type="tel".
el.pescado
2010-05-11 20:01:08
+3
A:
Short answer: yes. As @el.pescado mentions, browsers fall back to type=text
when they don't undertand the type. For more info about the other cool features you get from HTML5 forms, check out A Form of Madness, which is the forms chapter in Dive Into HTML5.
Hank Gay
2010-05-11 20:03:59
+6
A:
Yes, any unsupported type will revert to the 'type=text' format.
I found a good page which lists out all the existing input types. I tried looking at it from different browsers, a bit interesting. Don't know if it will help you or not.
animuson
2010-05-11 20:04:37
Awesome, thanks!
Michael
2010-05-11 22:25:35
That page is pretty cool.
miketaylr
2010-05-24 16:26:32