This is an archive of an inactive wiki and cannot be modified.

Specifying Input Mode


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


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


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.


In i-mode the istyle attribute of the INPUT and TEXTAREA elements is used to specify the required input mode. Refer to


E-Mail: <INPUT type="text" name="mail" value="" istyle="3" size="14" maxlength="20">

Back to BestPracticesList

CategoryBpDefaultInputMode CategoryXhtml CategoryWap CategoryImode

Contributions to this wiki are governed by the W3C policies for Contribution to W3C' wiki on Mobile Web.