You can use input formats to guide users when entering structured information into a Text Input node. Instead of relying on complex validation rules, you can define a format pattern that users follow while typing.
For example, you can define a phone number format such as (999) 999-9999. The wizard will display the format as a placeholder and guide the user through the input character by character.
Input formats provide a simpler alternative to enforcing input formats with regular expressions.
How input formats work
When an input format is configured:
- The defined pattern appears as a placeholder in the input field.
- Users are guided character by character while entering their input.
- Only characters matching the format pattern can be entered.
The following format characters are supported:
-
9- Digit (0–9) -
a- Letter -
*- Any character
Configure an input format
To configure an input format for a Text Input node:
- Open your module in the Editor.
- Add or select a Text Input node.
- In the configuration panel, enable Input format.
- Enter the desired format pattern (for example
(999) 999-9999). - Save your changes.
When the module runs, the wizard displays the masked input field with the format as a placeholder.
Example format patterns
The following examples illustrate common input format patterns.
-
US phone number
Input format:(999) 999-9999
User enters:2125557890
Stored value:(212) 555-7890 -
International / German phone number
Input format:+99 999 9999999
User enters:4915112345678
Stored value:+49 151 12345678 -
Reference code
Input format:AAA-999
User enters:ABC123
Stored value:ABC-123 -
Custom ID
Input format:***-9999
User enters:AB#4821
Stored value:AB#-4821
Note: Characters that are part of the format pattern (such as +, spaces, brackets, or dashes) are automatically inserted by the wizard. Users only enter the characters represented by the mask tokens (9, a, *).
The stored value includes the formatting characters defined in the input format.
Note on dates:
You can technically create a date-like format such as 99/99/9999. However, the value is stored as text, not as a date type. This means you cannot perform date calculations with it.
If you need to work with dates in logic, use a Date Input node instead.
Important considerations
- Input formats cannot be combined with regex validation. Enabling an input format disables custom validation rules.
- Input format cannot be used with line breaks.
- Incomplete values are automatically cleared if the user leaves the field without completing the required format.
- The stored value includes the formatting characters defined in the format.
Example: Collect a phone number
You can use an input format to guide users when entering a phone number.
(999) 999-9999
This ensures that phone numbers are entered in a consistent format for display or documentation purposes.
Important: Input formats store the value including the formatting characters (for example (123) 456-7890). Because the formatted value is stored in the variable, it may not be suitable for scenarios where an unformatted value is required.
For example, if you want to create a clickable phone link using the tel: protocol, you may need to use a regex validation instead of an input format so that the stored value can be used without formatting characters.
For instructions, see the following articles:
Alternative: Regex validation
Before input formats were available, authors typically enforced structured input formats using custom validation rules with regular expressions.
While this approach is still supported, input formats are usually easier to configure and provide a clearer user experience because they guide the user while typing.
For more information, see Custom Validations With Regular Expressions.