Configure input mask
The input mask setting constrains user entry to a required format, ensuring consistency, guiding the user, and preventing invalid data. It is applicable for fields of type DatePicker, DateTimePicker, Input, and MultiSelect Lookup. You can define placeholders, character restrictions, and custom validation rules for field input.
|
Configuration applies to: |
Business use cases
Input masks support consistent and valid data entry. Key scenarios include:
-
Standardized data entry: Enforce consistent formats for phone numbers, postal codes, or IDs.
-
Error prevention: Reduce invalid input by constraining allowed characters at entry time.
-
Regulatory compliance: Ensure identifiers follow mandated structural formats.
-
User guidance: Visually guide users on expected input length and structure.
Procedure
The following procedure uses the example of a customer contact form to demonstrate input masks for fields like Phone Number and Postal Code, ensuring that data is entered consistently and according to required formats.
-
In the Application tree, select a field to apply the input mask.
-
In the Settings/properties pane, set the field type to Input, DatePicker, DateTimePicker, or MultiSelect Lookup.
Result: The Mask section appears.
-
In Input Mask, enter a mask to enforce a specific format for the field value.
-
Use the placeholder character (default
*) to indicate positions. -
By default, all letters (A-Z, uppercase or lowercase) and numbers (0-9) are allowed in these positions.
Example:
* * * - * * * - * * *for a phone number.Result: The value is split into sections of three characters, formatted as
123-456-789. Users can enter letters or numbers in each placeholder position.
-
-
Optionally select Enable Mask Rule to constrain the type of input allowed.
Result: The fields Mask Character and Mask Rule appear.
-
(Optional) In Mask Character, change the default placeholder character if you do not want to use
*.Example: Use
#as the placeholder.Result: The mask displays as
# # # - # # # - # # #and the input is displayed accordingly. -
(Optional) In Mask Rule, select one of the following options:
-
All letters and numbers: Allows letters (
A-Z) and numbers (0-9). -
Only numbers 0-9: Restricts input to numeric characters.
-
Only letters: Restricts input to alphabetical characters.
-
Only uppercase letters: Restricts input to
A-Z. -
Only lowercase letters: Restricts input to
a-z. -
Custom Regex: Restricts input to a specific pattern to enter in the Custom Regex field that appears.
Example - (Only numbers 0-9): Postal code field mask
# # # #.Result: Only digits are allowed; letters cannot be entered.
Example - (Custom Regex):
^[A-Z]{2}[0-9]{4}$for an employee ID likeAB1234.Result: The field only accepts IDs that match the pattern.
-
-
In the Shell bar, select Save.
-
In the Preview pane, confirm that the mask formats input correctly and enforces character restrictions.