Forms 2.0 - Text Box
caution
This page is preliminary and subject to change as Forms 2.0 continues to be developed.
A normal text box field that users can type text into.

Adding a Text Box
Drag the Text Box tile from the field palette onto the Canvas - see Build for more on adding and arranging fields in general.
Parameters
Only Text Box-specific parameters are listed below. See Common Field Settings for the settings shared with other field types.
| Field | Description |
|---|---|
| Initial Value | The field loads initially having this value. Supports Tokens, so you can pull data from various sources such as a user profile. |
| Maximum Length | The maximum number of characters allowed. Supports Tokens. |
| Mask | Optionally set an input mask - for example, (000) 000-0000 for a phone number. 0 represents a numeric character (0-9), a an alpha character (A-Z, a-z), and * an alphanumeric character (A-Z, a-z, 0-9). Any other character is treated as a literal. Supports Tokens. |
| Mask Options | Only shown when Mask is set. A JSON object with additional mask options: reverse, clearIfNotMatch, selectOnFocus, placeholder, and translation (to add or override mask definitions, for example { "translation": { "h": { "pattern": "[A-Fa-f0-9]" } } }). Supports Tokens. Must be valid JSON - keys and values need double quotes. |
| Root CSS Classes | One or more CSS class names, separated by spaces, applied to the field's root element only. Class names are case-sensitive; a lowercase-with-hyphens naming style is recommended. Supports Tokens. |
| Custom Attributes | Name/value pairs inserted as HTML attributes on the field's <input> tag, for use by JavaScript or CSS. The attribute name must be a valid HTML attribute name. Supports Tokens. |
Common settings that apply to Text Box
A Text Box supports these Common Field Settings:
- General (Label, Name, and Hint)
- Active
- Visibility settings
- Enabled settings
- Field Automations - Value and On Change (Text Box does not support On Click)
- Field Validators
Tokens
A Text Box returns its current value as a token, referenced using the field's Name - for example, if the field's Name is FirstName, use [FirstName] elsewhere in the form or its actions to get the text the user entered.