Nokia 9200 Cell Phone User Manual


 
Forum.Nokia.com
3.6 WML Input Processing
3.6.1 Input elements
Figure 9: Input element – focus is in the input box with numeric format.
An input element specifies a text entry object for data input. It is shown as an input box in a card. The
text entered in the input element can be determined by the format attribute. The format string
specifies that a particular character must be a number, an uppercase character, or a lowercase
character, for example.
The user can enter any characters in the input field but the characters that do not currently match the
format are drawn in red color and are underlined (so that incorrect spaces or missing characters
become visible). In addition, every time the user enters a different type of input than the browser was
expecting, an appropriate info message in an "Incorrect input dialog box" will be displayed. All
characters that do match the format are drawn in black (normal body text color).
The author can specify a maximum length for the entry either with the format or with the maxlength
attribute. If the maximum length is reached, the input element will not insert any characters in the
field, but will beep and display an info message.
The author can specify with the emptyok attribute that the entry must match the format mask. If
there are input elements that do have that requirement, but the entry in those elements does not
match the mask (such as when the value is empty) and a task is initiated (either by a user action or
timer), the Missing Input dialog box will appear. Once the user has closed the dialog box, the focus will
move to the first of those input elements on the card. Note that the user can exit the card only if all
input elements have a valid value or if they are allowed to be empty.
<wml>
<card id="Form" title="Registration Form">
<p>
Please login:<br/>
</p>
<p align="right">
<small>User name:</small>
<input name="user" type="text" title="Max. 8 char. long"
format="*A" emptyok="false" maxlength="8"
size="25"/><br/>
<small>User password:</small>
<input name="user pw" type="password" title="Max 16 char.
Long"
format="*A" emptyok="false" maxlength="16"
size="25"/><br/>
WAP Service Developer’s Guide for Nokia 9200 Communicator Series
18