Logo
Logo

Input Masks

Breakdance supports input masks for Text fields in the Form Builder through the integrated Maska library. Input masks enforce consistent formatting for user input—ideal for fields like phone numbers, IP addresses, postal codes, and national identifiers.

How to Apply an Input Mask

  1. In the Breakdance editor, add or select a Text field.
  2. Go to Advanced > Mask.
  3. Enter your desired mask pattern using the syntax below.

Mask Tokens & Examples

Token Description Example Mask Example Input
# Digit (0–9) ###-### 123-456
0 Optional digit +1 (###) ###-###0 +1 (123) 456-7890
9 Multiple digits ###-###-9999 123-456-7890
@ Single letter (A–Z, a–z) @#@ #@# K1A 0B1
z Multiple letters (any case) zzz abc or XYZ
Z Uppercase multiple letters ZZZ ABC
* Letter or digit ***-*** A1B-2C3
! Escape character Invoice !#123 Invoice #123

Bracketed Masks for Dynamic Formats

You can define multiple valid formats using an array of masks. The appropriate mask will be automatically chosen based on user input.

Example: Brazilian CPF/CNPJ

['###.###.###-##', '##.###.###/####-##']
  • CPF: 123.456.789-10
  • CNPJ: 12.345.678/0001-90

Additional Examples

Use Case Mask Pattern Example Input
Phone Number +1 ### ###-##-## +1 555 123-45-67
Date ##/##/#### 31/12/2025
Credit Card #### #### #### #### 4111 1111 1111 1111
IP Address #00.#00.#00.#00 192.168.001.001
Year #### 2025
Meet Breakdance: The Best Visual Builder for WordPress
faces
Join thousands of freelancers and agencies who are working better and faster using Breakdance