An input mask guides the format of a value while a visitor types. Smart Form Builder provides predefined mask types and a custom pattern option. A mask formats and validates input; it is not a payment processor or a substitute for secure handling of sensitive data.
Choose a mask type
- Add or select Mask Field on the form canvas.
- Open its Mask Settings section.
- Use Mask Type to select the format that matches the value you need to collect.
- Configure the additional options that appear for that mask type, then save the form.
- Preview the form and test partial, complete, and invalid values before publishing.
Available mask types
- Phone: choose a supported phone format such as Phone (USA), Phone (8-digit), Phone (DDD + 8-digit), or Phone (DDD + 9-digit).
- Date & Time: choose a date, time, month/year, or date-and-time format.
- Money: configure the thousand separator, currency prefix, and decimal places.
- Credit Card: choose a display format such as spaces, hyphens, or an expiry-date format. This only formats input; it does not process or securely store card payments.
- Brazilian Formats: choose CPF, CNPJ, or CEP formatting.
- IP Address: format an IP-address value.
- Custom Mask: define a pattern for your own format.
Create a custom mask
When Mask Type is set to Custom Mask, enter a pattern in Mask Pattern. The pattern uses these characters:
- 0 — a number.
- A — a letter.
- * — a number or letter.
- Other characters, such as a hyphen, are inserted as part of the format.
For example, 0000-0000 formats eight digits with a hyphen between the two groups. The Mask Placeholders option is enabled by default and can show the expected format as a placeholder.
Verify the submitted value
The plugin validates masked values during form submission for supported formats. Test the exact format you expect visitors to enter, including incomplete values, and confirm that the form displays an error for invalid input. For general required-field and field-specific validation, see Configure Form Validation Rules.
Screenshot to add: Mask Field settings with Mask Settings expanded and the Mask Type selector visible