New on the blog: why AI belongs in the feed →

Same Form, Two Ways: Live Field Validation Demo

Here are two copies of the same registration form. The left copy is standard Gravity Forms: you find out what’s wrong after you press Register. The right copy has Live Field Validation switched on, so Gravity Forms checks each field as soon as you leave it. Same fields, same rules, same messages. Please use made-up details.

Try this on both

  • Type an email address without the @, then move to the next field.
  • Put a different address in Confirm Email.
  • Enter 12 in Number of attendees. The limit is 10.
  • Use the ticket code SAMPLE01. It has been used once already, so the no-duplicates check turns it down.
  • Click into Phone, leave it empty and move on.

Standard Gravity Forms

Standard Gravity Forms: errors show only after you press Register.

Name(Required)
Email(Required)
Please enter a number from 1 to 10.
Between 1 and 10.
Codes are single use. Try SAMPLE01 to see the duplicate check.
Terms(Required)

With Live Field Validation

Live Field Validation is on for this copy: Gravity Forms checks each field as soon as you leave it.

Name(Required)
Email(Required)
Please enter a number from 1 to 10.
Between 1 and 10.
Codes are single use. Try SAMPLE01 to see the duplicate check.
Terms(Required)

What the right-hand form is doing

When a visitor leaves a field, Live Field Validation sends that one field to Gravity Forms’ own validation (GFAPI::validate_field) and shows the answer under the field. It is the same check the form runs on submit: required fields, email and phone formats, number ranges, the confirm-email match, no-duplicates, and any gform_field_validation filters your site already has. It adds no rules of its own, so a value that passes live also passes on submit, and one that fails live fails on submit too.

That matters most on long forms. Without it, someone fills in twelve fields, presses the button, and scrolls back up to find three errors. With it, each mistake shows up while they are still looking at the field.

Turn it on for a form

  1. Open the form’s Settings and choose Live Field Validation.
  2. Switch on Enable Live Validation.
  3. Under Fields to Validate, tick the fields to check, or press Select All.
  4. Save.

GravityOps → Live Field Validation → Forms lists every form with its status, an Enable or Disable button and a Configure fields link. The Tester tab runs a field’s server-side validation against any value without filling in the form, which is a quick way to check a custom gform_field_validation rule before you switch it on.

CAPTCHA, HTML, section and page fields are skipped, and so are fields Gravity Forms can’t validate one at a time.