The following sections provide guidelines for using entry card format specifiers to constrain the text a user can enter.
The following sections provide guidelines for using entry card format specifiers to constrain the case of text that the user enters.
GUIDELINE: Specify mixed-case text entry in entry cards that accept the following types of information:
Unless you want to limit the number of mixed-case characters the user can enter, just use the default format specifier1 for entry cards that accept these types of information.
For example, the following HDML allows the user to enter a description (as shown in Figure 8-1). It uses the default format specifier.
FIGURE 8-1. Mixed-case text entry (with default format specifier)
If you want to limit the number of characters the user can enter, use the M specifier preceded by a number. For example, to let the user enter up to 7 mixed-case characters, use 7M. The following HDML allows the user to enter an address of up to 5 mixed-case characters (as shown in Figure 8-2).
FIGURE 8-2. Mixed-case text entry with a limited number of characters
Note that the default format specifier automatically capitalizes the first character the user enters. This behavior is strongly recommended for the types of information listed above. However, in some circumstances, your service may require that some types of free-form text begin with a lower case letter. To allow this, use the m (lowercase m) specifier, for example *m.
GUIDELINE: Specify lowercase-only text entry in entry cards that accept the following types of information:
To specify lowercase only, use the x format specifier. This specifier also allows the user to enter numbers and symbols (which may be required in email addresses).
For example, the following HDML allows the user to enter an email address (as shown in Figure 8-3).
FIGURE 8-3. Lowercase text entry
GUIDELINE: If you expect the user to enter a specific data type in an entry card, use format specifiers that allow only that type.
The following table lists some specific data types and the recommended format specifiers for them.
| Data type | Format specifiers |
|---|---|
|
For example, the following HDML allows the user to enter a stock option ticker symbol (as shown in Figure 8-3).
FIGURE 8-4. Uppercase text entry for a stock option symbol