How to Create a Format Mask

To create a format mask for the response field in a Text question, the following components that are part of a format mask must be used:

    Prompts: A prompt specifier represents a single symbol. Prompt specifiers are represented within the textbox through a placeholder character.

A, a – Alphanumeric

L, l – Alphabetic

C, c – Any character

> – Converts all symbols to the right to uppercase

< – Converts all symbols to the left to lowercase

~ – Cancels effect of the < or > symbol

# – Optional digital or signum symbol

9 – Optional digit

0 – Required digit

Note that specifiers in uppercase require completion. If one of these prompts is left empty, the content entered in the field will not be accepted.

    Culture-dependent separators: Standard culture dependent separators are allowed, such as “$”, “:”, “/”, “,”, “.”, etc.

    Ranges: This mask lets you set a range of allowable values by specifying the minimum and maximum limits. A range’s default value can be defined, which allows zero-filling, and you can control whether a culture-dependent thousand separator is displayed automatically. This type of mask supports mask hints.

<0..100>

<0..50..100> - With default value

    Enumerations: This type of mask allows you to define a collection of allowable string values and specify the default value, if required. This type of mask supports mask hints.

<A|B|C>

<A|*B|C> - With default value.

    Date/time specifiers: Standard and custom date/time specifiers are allowed, such as “d”, “dd MM yyyy”, etc.

    Literals: Literal symbols are used within mask expressions to group or separate different mask parts (such as parentheses in phone numbers or dashes in serial numbers, for instance) or for informative purposes. Symbols not specified above, a symbol preceded by a backslash (“\”), and a group of symbols wrapped with quotation marks or apostrophes are considered literals.

    Examples of format masks:

Phone number: +1 (999) 000 0000.

Value between 0 and 100: <0..100>

ZIP Code: 00000-9999

Date: mm/dd/yyyy

Monetary value: $9,999.99

Credit card number: 0000-0000-0000-0000

Social security number: 000-00-0000

Percentage: #%; #.00%

Time: h:mm or hh:mm for the 12-hour clock; H:mm or HH:mm for the 24-hour clock. For the 12-hour clock, add tt at the end to indicate AM or PM.