10 Formatted Entry Fields
■Force the entry type to numeric or alpha, if appropriate.
For example, in some environments, postal codes are numeric only. For those countries, force the entry type to numeric so that the user cannot enter alphabetic characters.
■Restrict the length of the string, if required.
This is helpful for phone numbers or credit card entries. For example, use maxlength="N"; where “N” is the maximum number of characters to limit the length of the entry. Use NNN if exactly 3 numbers are required along with the maxlength attribute.
Example
Zip code:<br/>
<input name="zip" format="NNNNN" maxlength="5" title="5 digit zip:"/>
Example
■Prefill known data.
With the Openwave browser, Mitsubishi Trium and Nokia 6210/6250 (but NOT the 7110 with browser version prior to 5.0) including forced characters in the format can help the user as they will need to enter less information. For example in an expiry date for a credit card field the format of NN\/\2\0NN could be used – this would only require the user to enter four digits for any month from January 2000 to December 2099.
In addition, with ALL browsers specifying a default value where one is sensible (or can be derived from personalisation information) avoids large quantities of data input. For example where a login and a password is absolutely required in some m- commerce sites consider
Openwave Formatted Input
■Set the default input mode to numeric when the entry typically is numeric or starts with a number, but also allow the user to enter letters or symbols.
For example, phone numbers generally consist of numbers only, but in some cases the user may also need to enter a special character, such as + or #. This applies to postal codes for some countries, purchase orders, ticket confirmations, and part numbers.
Example
<input name="phnum" type="phonenum"/>
Example
56 Genie Application Style Guide | February 2001 |