Show form
Similar to HTML's <FORM>, <fieldset> can be used to include a set of form options, but is not required. As mentioned earlier, when the ordered of <card> is set to false, the mobile phone can display a summary CARD to summarize effective options, so that users can select form options from it to fill in. The summary CARD is summarized based on <fieldset> and independent input box <input> and menu <select>. The syntax is, <fieldset title="label">form content</fieldset>. In addition to being used to represent the name of the form, the optional title attribute is also used as the title of the selection in the summary CARD. The form content can be nested <fieldset>, input box <input>, menu <select> and necessary prompt text.
<input name="variable" title="label" type="type" value="value" default="default" format="specifier" emptyok="false|true" size="n" maxlength="n" tabindex="n"/>, used to enter text. Except for the name attribute that is necessary, others are optional.
*name attribute specifies the name of the variable used to store the input text.
*title attribute, the name of the input box, can also be used as the option name in the summary CARD page.
*type attribute, the default value is text. If password is selected, the input data will be displayed as *.
*value attribute, syntax and behavioral equivalent to the following default attribute,
*default attribute specifies the default value of the input box, that is, the name attribute specifies the default value of the variable. When the user enters a new value, the value is invalid. If the value does not comply with the following format attribute requirements, the phone will also ignore the default value.
The *format attribute is used to format the input data. The available tags are as follows. When used, you can use the form of "bit-digit mark" and "* mark". The former represents N mark-type characters, such as 3X, and the latter represents any (less than the value of the maxlength attribute) mark-type characters.
Mark Description
A Any symbol or capital letter (excluding numbers)
a Any symbol or lowercase letter (excluding numbers)
N Any number (excluding symbols or letters)
X Any symbol, number or capital letter (cannot be changed to lowercase letters)
x Any symbol, number or lowercase letter (cannot be changed to uppercase letters)
M Any symbol, number or capital letter (can be changed to lowercase letters) or multiple characters, default to capital letters of the first character
m Any symbol, number or lowercase letter (can be changed to uppercase letters) or multiple characters, default to lowercase first character
*maxlength attribute specifies the maximum character length that the user can enter, with a maximum limit of 256 characters.
*emptyok attribute indicates whether the user can not fill in the input box. The default is false, that is, it is to fill in.
*size property, the input box display length, is not supported at present.
*tabindex attribute, similar to which option the focus falls on after pressing the TAB key in an HTML form, this value determines the order of selection, and the number with the large number is ranked behind. Not supported yet.
---------------
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/wml_1.">
<wml>
<card ordered="false">
<p>
USERNAME:<input name="userName" title="User Name" type="text" value="YourNameHere" format="*M" emptyok="false" maxlength="12" tabindex="1"/>
PASSWORD:<input name="password" title="Password" type="password" format="8x" emptyok="false" maxlength="8" tabindex="2"/>
COMMENTS:<input name="comments" title="comment" type="text" value="YourCommentsHere" format="*M" emptyok="true" maxlength="30" tabindex="3"/>
</p>
</card>
</wml>
Change the value of odered in the above example <card> to "true", and then add <fieldset title="field1"> and </fieldset> to <p> and </p> and try.
The <select> menu is similar to <SELECT> in an HTML form. The <select> and </select> can contain <optgroup> and <option> tags. The syntax is as follows, and all attributes are optional:
<select title="label" multiple="false|true" name="variable" default="default" iname="index_var" ivalue="default" tabindex=" n">
<optgroup title="label">menu content</optgroup>
<option title="label" value="value" onpick="url">
Events or text
</option>
</select>
*title attribute, such as the title attribute of <input> above.
*multiple attribute, specifying whether the user can make multiple choices, the default value is false.
*name attribute, used to store the variable name of the user's selection, its value is the value attribute of the <option> tag. If the user has no choice and does not use the default attribute to specify the default value, the phone will assign the change value to an empty string "". For multiple choices, each value is separated by ";".
*default attribute, you can assign default values to variables specified by the name attribute.
*iname attribute is used to record the location of the user's selection, and the corresponding value starts from 1. If not selected, the value is 0.
*ivue attribute is used to record the default value.
<optgroup> can be used to group multiple <option>s, and <optgroup> and </optgroup> can also include <optgroup> and <option>. This tag is not currently supported.
<option>, similar to <OPTION> of a menu in HTML, is used to represent options for menus. The display text between <option> and </option> may include events (see the next section) and menus. The attribute of <option> is optional, where the value attribute is used to provide a value. After this item is selected, the value is assigned to the variable specified by the name attribute of <select> . The onpick attribute is used to specify the URL of the page opened after the user selects this item and presses the ACCEPT key.
---------------
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/wml_1.">
<wml>
<card ordered="false">
<p>
Please select a city...
<select title="Cities List" name="city">
<option title="Beijing" value="c1">Beijing</option>
<option title="Shanghai" value="c2">Shanghai</option>
<option title="Hongkong" value="c3">Hongkong</option>
</select>
Please select columns...
<select title="Column List" multiple="true" name="col">
<option title="Hot News" value="l1">News</option>
<option title="Cool Sports" value="l2">Sports</option>
<option title="Pop Enter,,," value="l3">Entertainment</option>
</select>
</p>
</card>
</wml>
Similar to HTML's <FORM>, <fieldset> can be used to include a set of form options, but is not required. As mentioned earlier, when the ordered of <card> is set to false, the mobile phone can display a summary CARD to summarize effective options, so that users can select form options from it to fill in. The summary CARD is summarized based on <fieldset> and independent input box <input> and menu <select>. The syntax is, <fieldset title="label">form content</fieldset>. In addition to being used to represent the name of the form, the optional title attribute is also used as the title of the selection in the summary CARD. The form content can be nested <fieldset>, input box <input>, menu <select> and necessary prompt text.
<input name="variable" title="label" type="type" value="value" default="default" format="specifier" emptyok="false|true" size="n" maxlength="n" tabindex="n"/>, used to enter text. Except for the name attribute that is necessary, others are optional.
*name attribute specifies the name of the variable used to store the input text.
*title attribute, the name of the input box, can also be used as the option name in the summary CARD page.
*type attribute, the default value is text. If password is selected, the input data will be displayed as *.
*value attribute, syntax and behavioral equivalent to the following default attribute,
*default attribute specifies the default value of the input box, that is, the name attribute specifies the default value of the variable. When the user enters a new value, the value is invalid. If the value does not comply with the following format attribute requirements, the phone will also ignore the default value.
The *format attribute is used to format the input data. The available tags are as follows. When used, you can use the form of "bit-digit mark" and "* mark". The former represents N mark-type characters, such as 3X, and the latter represents any (less than the value of the maxlength attribute) mark-type characters.
Mark Description
A Any symbol or capital letter (excluding numbers)
a Any symbol or lowercase letter (excluding numbers)
N Any number (excluding symbols or letters)
X Any symbol, number or capital letter (cannot be changed to lowercase letters)
x Any symbol, number or lowercase letter (cannot be changed to uppercase letters)
M Any symbol, number or capital letter (can be changed to lowercase letters) or multiple characters, default to capital letters of the first character
m Any symbol, number or lowercase letter (can be changed to uppercase letters) or multiple characters, default to lowercase first character
*maxlength attribute specifies the maximum character length that the user can enter, with a maximum limit of 256 characters.
*emptyok attribute indicates whether the user can not fill in the input box. The default is false, that is, it is to fill in.
*size property, the input box display length, is not supported at present.
*tabindex attribute, similar to which option the focus falls on after pressing the TAB key in an HTML form, this value determines the order of selection, and the number with the large number is ranked behind. Not supported yet.
---------------
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/wml_1.">
<wml>
<card ordered="false">
<p>
USERNAME:<input name="userName" title="User Name" type="text" value="YourNameHere" format="*M" emptyok="false" maxlength="12" tabindex="1"/>
PASSWORD:<input name="password" title="Password" type="password" format="8x" emptyok="false" maxlength="8" tabindex="2"/>
COMMENTS:<input name="comments" title="comment" type="text" value="YourCommentsHere" format="*M" emptyok="true" maxlength="30" tabindex="3"/>
</p>
</card>
</wml>
Change the value of odered in the above example <card> to "true", and then add <fieldset title="field1"> and </fieldset> to <p> and </p> and try.
The <select> menu is similar to <SELECT> in an HTML form. The <select> and </select> can contain <optgroup> and <option> tags. The syntax is as follows, and all attributes are optional:
<select title="label" multiple="false|true" name="variable" default="default" iname="index_var" ivalue="default" tabindex=" n">
<optgroup title="label">menu content</optgroup>
<option title="label" value="value" onpick="url">
Events or text
</option>
</select>
*title attribute, such as the title attribute of <input> above.
*multiple attribute, specifying whether the user can make multiple choices, the default value is false.
*name attribute, used to store the variable name of the user's selection, its value is the value attribute of the <option> tag. If the user has no choice and does not use the default attribute to specify the default value, the phone will assign the change value to an empty string "". For multiple choices, each value is separated by ";".
*default attribute, you can assign default values to variables specified by the name attribute.
*iname attribute is used to record the location of the user's selection, and the corresponding value starts from 1. If not selected, the value is 0.
*ivue attribute is used to record the default value.
<optgroup> can be used to group multiple <option>s, and <optgroup> and </optgroup> can also include <optgroup> and <option>. This tag is not currently supported.
<option>, similar to <OPTION> of a menu in HTML, is used to represent options for menus. The display text between <option> and </option> may include events (see the next section) and menus. The attribute of <option> is optional, where the value attribute is used to provide a value. After this item is selected, the value is assigned to the variable specified by the name attribute of <select> . The onpick attribute is used to specify the URL of the page opened after the user selects this item and presses the ACCEPT key.
---------------
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "/DTD/wml_1.">
<wml>
<card ordered="false">
<p>
Please select a city...
<select title="Cities List" name="city">
<option title="Beijing" value="c1">Beijing</option>
<option title="Shanghai" value="c2">Shanghai</option>
<option title="Hongkong" value="c3">Hongkong</option>
</select>
Please select columns...
<select title="Column List" multiple="true" name="col">
<option title="Hot News" value="l1">News</option>
<option title="Cool Sports" value="l2">Sports</option>
<option title="Pop Enter,,," value="l3">Entertainment</option>
</select>
</p>
</card>
</wml>