SoFunction
Updated on 2025-04-07

WML Tutorial: Text Box Control Input

<input name="name" title="title" type="type" value="value" format="specifier" emptyok="false|true" size="n" maxlength="n" tabindex="n"/>
Used to enter text, except that the name attribute is necessary, other parameters are optional.
Related attributes:
title, the title of the input box.
type, the default value is text. If password is selected, the input data will be displayed as *.
name, specifies the name of the variable used to store the input text.
value, very similar to the same attribute of select, name is used to store variable data, value is used to provide default values.
format, used to format the input data, the available marks are as follows, and when used, they can be used in 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
The maxlength property 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 needs to be filled in.
size property, input box display length, is not supported at present.
The tabindex attribute is similar to which option the focus falls on after pressing the tab key in the html form. This value determines the order of selection, and the number with the large number is ranked behind. Not supported yet.
Example:
<card>
<p>
 first name:
 <input type="text" name="first"/><br/>
 last name:
 <input type="text" name="last"/><br/>
 age:
 <input type="text" name="age" format="3n"/>
</p>
</card>