Description
An AmlInput element is a text input field where the user can enter up to maxchars characters. The content input by the user becomes the value of the variable whose name is the value of the name attribute.
Element Body
((AmlContainer*, (AmlText | AmlImage)?, AmlStyle?)
Parent
AmlForm, AmlTableCol, AmlGroup, AmlListItem
Restrictions
None
AML Attributes
Attribute |
Description |
Possible values |
Default |
Req’d? |
---|---|---|---|---|
name |
Set name of the textfield |
CDATA |
No Default |
Yes |
type |
Set type of textfield data |
CDATA |
No Default |
No |
value |
Set value of textfield |
CDATA |
No Default |
No |
view |
Set view option for textfield |
(show|hidden|none) |
show |
No |
format |
Set format of textfield |
CDATA |
No Default |
No |
maxchars |
Set max characters of the input textfield |
CDATA |
No Default |
No |
width |
Set width of textfield |
CDATA |
No Default |
No |
italics |
Set italics emphasis |
(true|false) |
false |
No |
bold |
Set bold emphasis |
(true|false) |
false |
No |
underline |
Set underline emphasis |
(true|false) |
false |
No |
text |
Set text for label |
CDATA |
No Default |
No |
textsize |
Set size of text |
(big|normal|small) |
normal |
No |
persist |
Set persist flag |
(true|false) |
false |
No |
Markup Language Examples
Sample AML Input:
<AmlDocument> <AmlPage id="p1" title="Login" bold="true"> <AmlForm url="Validate"> <AmlInput text="Username:" maxchars="30" name="user"/> <AmlInput text="PIN:" maxchars="10" name="pin"/> </AmlForm> </AmlPage> </AmlDocument>
Sample WML Output:
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head> <meta http-equiv="Cache-Control" content="max-age=0"/> </head> <card id="p1"> <p align="center">Login</p> <p> Username: <input emptyok="true" name="user" maxlength="30"/> PIN: <input emptyok="true" name="pin" maxlength="10"/> </p> <do label="submit" type="accept"> <go href="Validate?user=$(user)&pin=$(pin)" sendreferer="true" method="get"/> </do> </card> </wml>
Sample cHTML Output:
<html> <head> <title></title> <meta name="PalmComputingPlatform" content="true"></meta> <meta http-equiv="Pragma" content="no-cache"></meta> <meta http-equiv="Cache-Control" content="no-cache"></meta> </head> <body> <div align="center"> <a name="p1"><b>Login</b></a> </div> <form enctype="application/x-www-form-urlencoded" action="Validate" method="get"> Username: <input name="user" maxlength="30"></input> PIN: <input name="pin" maxlength="10"></input><br> <input name="request" type="submit" value="Submit"></input> </form> </body> </html>