WML TAG:  input

<input ... />
 
The input tag is used to collect text or password information that is entered into the browser by the user. The input element will display an input field, which upon being selected, opens a text editing window in which the user can enter the requested information. If valid, the value entered by the user will be assigned to the variable named in the mandatory name attribute. An invalid entry will not be accepted by the browser.
 
Validity is based upon the input mask set by the optional format attribute. An input mask dictates which alphanumeric and punctuation characters can be entered into the input element and the order that they must be entered. For example, if the input mask specifies only numeric characters [0-9], then the text typed by the user cannot contain any other type of characters. The default is to accept essentially any number of any type of characters (but all characters are treated as uppercase for date entry). Note that the emptyok attribute will permit an empty entry even if an input mask is in place.
 
The characters in the password string are usually displayed on the monitor as a series of asterisks. However, a password input is not secure.
 
In WML, there is no equivalent to the form tag in HTML. However, you can use fieldset elements to group related input elements.
 
This is a self-closing tag.
 
Nested Tags:  None
 
Attributes
 
class
The optional class core attribute is used to assign one or more classes to the element. Multiple classes are separated by white space. The class name is case sensitive (i.e., Stocks and stocks are not the same).
 
emptyok
The optional emptyok attribute sets a Boolean value that specifies whether empty input will be accepted (even if the format attribute is set). The default is false which forbids empty values, while true permits empty values.
 
format
The optional format attribute specifies which input mask is in effect. An input mask dictates which alphanumeric and punctuation characters can be entered by the user and the order in which they must occur. The default is equivalent to *M (any number of any characters, but all characters are treated as uppercase for date entry).
 
The permitted values are:
Value Description
A Any uppercase alphabetic or punctuation character
a Any lowercase alphabetic or punctuation character
N Any numeric character
* N Any number of any numeric characters
X Any uppercase character
x Any lowercase character
M Any character, but is treated as uppercase for date entry
*M Any number of any characters, but is treated as uppercase for date entry
m Any character, but is treated as lowercase for data entry
* f Any number of any type of characters
n f Any n integer number of any characters
\c Display the character after the slash in the display
Note that you can add an asterisk as a prefix to indicate multiple characters (i.e., *X)
or add an integer as a prefix to set a fixed number of characters (i.e., 5X).
 
id
The optional id core attribute is used to assign an identifying name to a tag. The name must be unique to the entire deck and not just unique to a card. The first character of the name can be any letter or the underscore. The remaining characters can be any combination of letters, numbers, or underscores.
 
maxlength
The optional maxlength attribute is an integer number that sets the maximum number of characters that will be accepted by the input. The default is an unlimited number of characters.
 
name
The mandatory name attribute specifies the name of the variable that will be assigned the value of the string or text entered by the user in the input element. The named variable automatically assumes the default value set by the value attribute until it is overwritten by the user.
 
size
The optional size attribute is an integer number that sets the character width of the input field. The default is usually one space.
 
tabindex
The optional tabindex attribute is an integer number greater than zero that sets the rank in the tabbing order for the current element. The rank dictates the order in which the elements in a single card will be traversed when tabbing.
 
title
The optional title attribute provides a string or text used to describe or provide additional information about the link.
 
type
The optional type attribute selects whether the input is either a text or password entry. The default is text.
 
value
The optional value attribute assigns the default value for the variable named in the mandatory name attribute. This value will automatically appear inside the input field in the display. The value entered by the user will override this default value. If an input mask has been selected by the format attribute, the value of the value attribute must conform.
 
xml:lang
The optional xml:lang attribute sets the language, such as English or Greek, used in the element. For example, in the U.S. the default value is en-US.
 
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Card 1">
<p>
 
First Name: <input id="inp1" type="text" name="firstname" format="M*m" /><br />
 
Last Name: <input id="inp2" type="text" name="lastname" format="M*m" /><br />
 
Age: <input id="inp3" type="text" name="age" format="*N" maxlength="3" emptyok="true" /><br />
 
Street: <input id="inp4" type="text" name="street" /><br />
 
City: <input id="inp5" type="text" name="city" /><br />
 
State: <input id="inp6" type="text" name="state" format="MM" /><br />
 
Zip: <input id="inp7" type="text" name="state" format="5N" /><br />
 
</p>
</card>
</wml>


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information