[Cover] [Previous Section] [Next Section] [Index]

Current chapter: HDML Statement Reference
Section 25 out of 35 total sections , Section 9 out of 12 sections in this chapter


<ENTRY>

An entry card displays content followed by an entry line in which the user enters data. To define an entry card, you use an <ENTRY> statement. The statement specifies the format for data entered by the user and a variable to which the value in the field is stored. It can also specify a default value.



Syntax

<ENTRY  

Beginning of the entry header.  

  NAME=card_name  

A name for the card. Other cards can specify this name as a destination. 

  MARKABLE=boolean  

Flag specifying whether the card can be marked. To allow the card to be marked, specify TRUE. The default value is determined by the MARKABLE option for the deck (see <HDML>).  

Always set MARKABLE=FALSE for cards that execute or confirm transactions that the user might not want to repeat.  

If you set MARKABLE=TRUE, it implicitly sets the PUBLIC option to TRUE, allowing other URLs to link directly to the card. 

  TITLE=card_title  

The default bookmark name that appears when the user marks the card. 

  BOOKMARK=mark_URL  

The URL the phone adds to the bookmark list if the user marks the card. If you do not specify the BOOKMARK option, the phone adds the URL of the current card to the bookmark list. 

  FORMAT=fmt_spec  

A format specifier for the data the user enters. See Format specifiers below for descriptions of the available format tags. You can also use the format specifier to automatically insert characters into the entry field (see Automatic characters below). 

The default format is *M (any number of mixed case alphabetic and numeric characters). 

  DEFAULT=default_value  

A string that appears in the entry field when the UP.Phone first displays the card. The user can edit the string. The default value can be formatted text or a variable containing text. 

If the variable specified by the KEY option has a value, it overrides the value specified by the DEFAULT option. 

  KEY=var  

The name of the variable to which the UP.Phone stores the data entered by the user. If the specified variable already has a value, the value appears as the default in the entry field. 

  NOECHO=boolean  

If NOECHO=TRUE, the phone hides text the user enters. After the user enters a character, the phone displays it as an asterisk (*). The default is FALSE

  EMPTYOK=boolean  

If you set EMPTYOK to TRUE, the phone accepts empty input, even if you have specified a format with the FORMAT option. The default is FALSE

>  

End of the entry header.  

actions  

The actions to execute when the user presses a function key. For more information on specifying actions, see <ACTION>

display_content  

The formatted text message to display above the entry line. For more information on specifying formatted text, see Formatted text

Avoid using more than 24 characters of text. If you use more, it will scroll off the top of the screen on many devices and the user will have to scroll back to read the entire text. 

</ENTRY>  

The entry footer. 


Format specifiers

Tag  Description 
A  

Any uppercase alphabetic character or punctuation (no numbers). 

a  

Any lowercase alphabetic character punctuation (no numbers). 

N  

Any numeric character (no symbols). 

X  

Any numeric, symbolic, or uppercase alphabetic character or punctuation. 

x  

Any numeric, symbolic, or lowercase alphabetic character or punctuation. 

M  

Any alphabetic character (of any case), and any numeric or symbolic character. If it is preceded by a number or * specifier, the first character the user enters is uppercase by default (the user can change it to lowercase). 

m  

Any alphabetic character (of any case), and any numeric or symbolic character. If it is preceded by a number or * specifier, the first character the user enters is lowercase by default (the user can change it to uppercase). 

To require a set number of characters of a particular type, precede the format tag with a single digit number. For example, the specifier 3X requires the user to enter three numeric, symbolic, or uppercase alphabetic characters. To allow any number of characters, precede the tag with an asterisk (*). For example, the specifier *X lets the user enter any number of numeric , symbolic, or uppercase alphabetic characters.


Automatic characters

To instruct the UP.Phone to automatically add characters to the entry field, include them in the format string. Precede each character with a backslash. As the user reaches the position of each character, the UP.Phone adds it automatically. For example, if you specify the following string:

the UP.Phone adds the left parenthesis to the entry field immediately. After the user types three characters, the UP.Phone automatically adds the right parenthesis and a space. Users can not edit the automatically added characters.


Examples

The following HDML deck generates the display shown in Figure 2-9:

FIGURE  2-9.     Entry card display

If the user enters CA as shown in Figure 2-9 and presses ACCEPT, the current URL is requested with the following arguments:


[Cover] [Previous Section] [Next Section] [Index]

Current chapter: HDML Statement Reference
Section 25 out of 35 total sections , Section 9 out of 12 sections in this chapter


Copyright © 1999, Unwired Planet, Inc. All rights reserved.