🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials October 14, 2026

Gravity Forms Input Masks and Formatting: Clean Dates, IBANs, Postcodes and Amounts

GravityExtra
Gravity Forms Input Masks and Formatting: Clean Dates, IBANs, Postcodes and Amounts

Open the entries of any busy form and you will find the same date written as 3/4/26, 03-04-2026 and 3rd April. Bank details with a digit missing. Postcodes in lower case without a space. Names typed entirely in capitals, or entirely without them. Amounts with commas, dots and currency signs in different places. Every one of those entries needs fixing by hand before it can go into an invoice, a spreadsheet or a CRM.

This guide explains how input masks and formatting rules solve that in Gravity Forms, which options matter for different kinds of data, and how the Gravity Forms Input Masks & Formatting Premium Add-on formats values while people type and checks them again on submit.

For bank details specifically, the Gravity Forms IBAN validator add-on masks the IBAN in groups of four and checks its Modulo-97 checksum.

What Good Input Formatting Does

  • Guides the visitor: the expected format is visible, separators are added automatically and the phone shows the right keyboard.
  • Fixes small things silently: capitals, spaces and separators are corrected without bothering anyone.
  • Stops real mistakes early: an impossible date or a mistyped bank account is flagged when the visitor leaves the field, not after you try to use it.
  • Never trusts the browser alone: the same rules must run on the server, because scripts can be blocked or bypassed.
  • Saves data in a usable shape: formatted for people, or as a plain number for calculations and other systems.

Your Options Today

1. The built-in input mask

Gravity Forms has an Input Mask setting on Single Line Text fields with a few standard masks and a custom mask syntax. It is useful for simple fixed patterns, but it does not check whether a date really exists, does not validate bank details, cannot format amounts with separators and limits, and does not change letter case.

2. Validation code snippets

Developers can add validation with PHP snippets and some JavaScript. That works for one rule on one form, but every new rule needs a developer, the browser and server versions drift apart, and the snippets are easy to lose when the theme changes.

3. Clean up after the fact

Many teams simply fix the data in a spreadsheet or before importing it into another system. It is the most expensive option, because it happens for every entry, forever.

What the Input Masks & Formatting Add-on Does

The add-on adds a Formatting section to the Appearance tab of Single Line Text, Paragraph Text, Name, Address and Email fields:

  • Ready-made formats: dates in three orders with a real-date check, 24-hour time, IBAN with the international checksum, UK postcode, Canadian postal code, US ZIP and EIN, UK sort code and EU VAT number.
  • Custom masks with digits, letters and optional endings, for order references, membership numbers and product codes.
  • Numbers and amounts with your decimals, thousands separator, decimal mark, currency sign or unit, minimum and maximum.
  • Letter case: UPPERCASE, lowercase, Title Case or Sentence case.
  • Allowed characters, extra-space removal and pattern rules with your own message.
  • Save as shown or as plain values, so a budget of $1,234.50 can be stored as 1234.5.
Gravity Forms form with formatted values: date 25/12/2026, IBAN in groups of four, postcode SW1A 1AA, budget $1,234.50, reference AB-1234, name Mary-Jane O'Neil and a lower-case email
Every value in the same shape, however it was typed.

How to Add Input Masks to a Gravity Forms Form

Requirements: WordPress 6.5+, Gravity Forms 2.9+ (any licence), PHP 7.4+ and the add-on with an active GravityExtra license.

Step 1: Pick the field

Open the form in the form editor and select a Single Line Text field, for example “Delivery date”. Open the Appearance tab and scroll to Formatting.

Step 2: Choose a format

Choose Date (DD/MM/YYYY). Visitors now see the format as a placeholder, the slashes appear as they type, and 31/02/2026 is refused with a clear message. For a code such as AB-1234, choose Custom mask, type aa-9999 and set Letter case to UPPERCASE.

Step 3: Format amounts

For a budget field choose Number or amount, two decimals, the comma as thousands separator, a $ before the number and a minimum of 100. Visitors type 1234.5 and see $1,234.50; anything below $100.00 gets a message. Choose Only the typed characters / plain number under Save in the entry if you calculate with the value later.

Formatting settings with Number or amount, decimals, thousands separator, decimal mark, currency sign, minimum, letter case and allowed characters
All formatting options sit in the Appearance tab of the field.

Step 4: Clean up names and free text

Select the Name field and set Letter case to Title Case and tick Remove extra spaces: “ mary-jane o’NEIL ” becomes “Mary-Jane O’Neil”. Set the Email field to lowercase, and a Paragraph Text field to Sentence case if people tend to write in capitals.

Step 5: Test it

Preview the form and type a wrong IBAN or an impossible date. A short message appears under the field when you leave it and disappears as soon as the value is fixed. Then submit: the entry contains the clean values.

Form field IBAN with a red border and the message Please check the IBAN: it is not a valid bank account number
Mistakes are flagged before the form is sent.

Which Format to Use

  • Bookings and deliveries: a date format in your local order plus a 24-hour time.
  • Payments by bank transfer and direct debits: the IBAN format, which catches most typing mistakes with the checksum, plus a UK sort code where needed.
  • Quotes and applications: amounts with a currency sign and a sensible minimum and maximum.
  • B2B forms: the EU VAT number format and a company name with allowed characters such as & and full stops.
  • Addresses: UK postcode, Canadian postal code or US ZIP code formats, and Title Case for street and city.
  • Internal references: a custom mask that matches your order or membership numbers.

Tips for Better Data

  • Format, then check: let the add-on fix capitals and spaces, and only show a message for real mistakes.
  • Keep messages specific: when you write your own pattern message, give an example such as “ABC-123”.
  • Store plain numbers for anything you calculate with or send to another system.
  • Do not over-restrict names: allow hyphens and apostrophes, which the letters-only option keeps.
  • Turn off the built-in mask on fields where you use a format from the add-on, so the two do not compete.

Accessibility and Mobile

Formatting should never make a form harder to use. The add-on keeps the cursor where the visitor is typing, even when separators are added in the middle of a value, so editing the day of a date or one digit of an IBAN works as expected. When a value is not valid, the field is marked as invalid for screen readers and the message is linked to it, so assistive technology reads the message together with the field. On phones, numeric formats such as dates, times, ZIP codes and amounts open the number keyboard, and upper-case formats switch the keyboard to capitals, which saves visitors several taps on every field.

New in 1.1: Find and Replace and Emoji Removal on Save

Formats keep dates, IBANs and amounts tidy, but free text needs a different kind of clean-up: short forms written out, one spelling for a word, no emoji in the CRM. Version 1.1.0 adds two per-field settings under Transform on save:

  • Find and replace rules, run in the order you set: plain text such as “rd.” to “Road”, or a simple pattern where * stands for any run of characters and ? for one character. Match the letter case or not.
  • Remove emoji, or emoji and other symbols such as ★ ✓ →. Letters of every script, accents and digits are kept.
  • The cleaned value is the saved value, so notifications, merge tags, PDFs and the entry list all show it, with or without JavaScript.

Catering enquiry form as typed: a name in lower case with an emoji, an address with rd., and order notes with emoji, stars and a remark in brackets

The form above is saved as “Amelia Hart”, “27 Harbour Road” and “About 40 guests. Two vegetarian and three gluten-free platters, please”. Fields without the new settings work exactly as before. Full steps: Transform on save in the Input Masks & Formatting guide.

Comparison: Ways to Get Clean Form Data

Input Masks & Formatting Built-in input mask Code snippets
Masks while typing Yes Yes Custom code
Real-date and IBAN checks Yes No Custom code
Amounts with separators and limits Yes No Custom code
Letter case and allowed characters Yes No Custom code
Same rules on the server Yes Partly If written twice
Save plain values Yes No Custom code
Set up without a developer Yes Yes No

Clean Data From the First Keystroke

Masks, number formats, letter case and live checks for Gravity Forms fields, applied while typing and again on submit.

Frequently Asked Questions

Does it work if JavaScript is off?

Yes. The browser script makes typing easier, but the same rules run on the server before the entry is saved, so values are formatted and checked either way.

Does it check that an IBAN or VAT number really exists?

It checks the format and, for IBANs, the international checksum, which catches most typing mistakes. It does not contact banks or tax authorities.

Can I use it on phone number fields?

Phone numbers are covered by the separate GravityExtra International Phone Number Mask add-on, which is built for country codes and phone formats.

Which fields are supported?

Single Line Text gets every option. Paragraph Text, Name, Address and Email get letter case, allowed characters and space clean-up.

Do I need a particular Gravity Forms licence?

No. The add-on works with any Gravity Forms licence, version 2.9 or newer.

What happens if my GravityExtra licence expires?

Your forms keep working as normal Gravity Forms fields; formatting and checks pause until the licence is renewed.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr