I am working on a mobile site where I would like to utilize iOS’s number, url, and email keyboards for certain input fields.
My issue is that I am forced to use <input type="text" /> for reasons that I won’t get into.
Is there a way to trigger different keyboards by other means — effectively “hinting” at their intended use?
In short, no. Mobile Safari uses the input type as its only clue as to which keyboard to show. Setting it to “text,” “number,” “url,” etc. is the accepted method.
That said… I’m not sure why you need to keep the input
type="text"(assuming a political decision or CMS limitation), but would it be acceptable to trigger a javascript function on page load to perhaps change thetypeattribute (perhaps only when a mobile safari user agent is detected)? Maybe not ideal, but it may give you the flexibility to make it work.