Specifying Input Mode
WAP
WAP used a technique refered to as "Input Masks" to indicate the required input format for an input element. User agents could use this value to switch between text/numeric uppercase/lowercase input modes. Refer to the WML 1.1 specification description of the format attribute of the input element.
See also the Wireless CSS specification, section 19.2 -wap-input-format
Example:
Zip code: <input type="text" name="zip" value="" format="NNNNN"/>
XHTML Mobile Profile
The XHTML Mobile Profile 1.2 specification introduced the inputmode attribute taken from the XForms specification. Refer to XHTML MP 1.2
and XForms
Example:
Comments: <textarea name="comment" inputmode="latin predictOn" rows="8" cols="20"></textarea>
In earlier versions of XHTML Mobile Profile there was no standard way to specify the input mode, however most implementations supported the following syntax (from Wireless CSS):
Phone: <input type="text" style="-wap-input-format='*N'"/>
See Andrea Trasatti's excellent blog for a discussion on this.
cHTML
In i-mode the istyle attribute of the INPUT and TEXTAREA elements is used to specify the required input mode. Refer to
Example:
E-Mail: <INPUT type="text" name="mail" value="@docomo.ne.jp" istyle="3" size="14" maxlength="20">
Back to BestPracticesList
CategoryBpDefaultInputMode CategoryXhtml CategoryWap CategoryImode