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

Gravity Forms Legacy Markup: How to Switch Your Forms Safely (and What Breaks)

GravityExtra
Gravity Forms Legacy Markup: How to Switch Your Forms Safely (and What Breaks)

Open the settings of an older Gravity Forms form and you may find a toggle called Enable legacy markup, switched on, with a notice saying that legacy markup will be removed. Many sites have a handful of these forms: a contact form from years ago, a membership application, an event registration that has been copied every season. They still work, so nobody touches them. But legacy markup is planned to be removed in a future Gravity Forms version, and when a form changes from legacy to modern markup, its HTML changes too. Any CSS or code on your site that was written for the old HTML can stop working at that moment.

This guide explains what legacy markup is, what actually changes when a form switches, what Gravity Forms 3.0 already changed for every form, and a safe way to move your forms: find what would break first, convert the old layout classes, preview, switch with a backup, and keep a way back. It uses the Gravity Forms Legacy Markup & 3.x Migration Assistant add-on for the parts that are tedious by hand.

What “legacy markup” means in Gravity Forms

The markup of a form is the HTML that Gravity Forms writes into your page. Up to version 2.4, every form used the same structure: the fields were items of a ul list, each field an li, the title an h3. Layout came from CSS Ready Classes: you typed gf_left_half on one field and gf_right_half on the next, and the two sat side by side.

Gravity Forms 2.5 replaced that with modern markup: fields are div elements in a CSS grid, the title is an h2, and the form editor lets you drag fields into rows and set their width directly. Forms created before 2.5 kept the old HTML so that existing sites would not change overnight. That old HTML is what Gravity Forms calls legacy markup, and the toggle on each form controls it.

What changes when a form switches

When you turn legacy markup off, the content of the form stays the same: the same fields, labels, choices, notifications and confirmations. What changes is the HTML around them, and that is what CSS and scripts rely on:

  • The list of fields is a div, not a ul, and each field is a div, not an li. A rule such as .gform_wrapper ul.gform_fields li.gfield no longer matches anything.
  • Checkbox and radio choices are div elements too, so .gfield_checkbox li stops matching.
  • The form title is an h2 instead of an h3.
  • The validation message wrapper loses its old validation_error class.
  • The old Gravity Forms stylesheet for legacy forms, including the styles of the column Ready Classes, is no longer loaded for that form. Gravity Forms maps the column classes to its new width helpers, but the modern way is the row and width settings of the form editor.

None of this matters for a form with no custom styling. For a form whose look was tuned with a few lines of CSS in the theme or the Customizer, those lines quietly stop working and the form falls back to the default style. Nothing errors; it just looks different.

What Gravity Forms 3.0 already changed

Separately from legacy markup, Gravity Forms 3.0 changed things that themes and code snippets often depend on, for every form. According to the Gravity Forms change log:

  • Buttons are <button> elements. The submit, next and previous buttons used to be <input> elements. CSS or JavaScript that targets input.gform_button or input[type=submit] inside a form no longer finds them.
  • A new date picker. Date fields use a new accessible date picker that does not rely on jQuery UI. Code that calls .datepicker() on a Gravity Forms date field, or styles #ui-datepicker-div, no longer reaches it.
  • Spinner filters removed. The gform_ajax_spinner_url, gform_spinner_url and gform_always_show_spinner filters were removed; the spinner now shows inside the submit button and is styled with CSS.
  • The gform_price_change event is listed as removed; the current source only keeps it as a deprecated fallback. The replacement is the gform/products/product_field_changed event.
  • The gform_input_mask_script filter was deprecated for removal in 3.0, when the input masks moved to a new library.

If your theme or a snippet uses any of these, it already does nothing on a current Gravity Forms, whether or not your forms use legacy markup. These are worth finding first.

Why switching by hand is risky

On paper, moving a form is simple: open Form Settings, switch off Enable legacy markup, save. In practice, there are three problems.

You do not know what will break until it breaks. The CSS that styles your forms can live in the parent theme, the child theme, the Customizer’s Additional CSS or a snippet. Finding every rule that depends on the old HTML means reading all of them, and knowing which selectors are legacy-only.

The layout classes need converting. A form laid out with gf_left_half and gf_right_half should get the equivalent rows and widths in the modern layout. On a form with twenty fields that is twenty careful edits in the form editor.

There is no simple way back. In Gravity Forms 3.1 the legacy markup toggle is only shown while a form still uses legacy markup, so once you switch it off in Form Settings, you cannot switch it back on there. In that version, forms imported from an export file are also always set to modern markup, so exporting first does not give you a way back to legacy markup either.

A safe way to move your forms

1. Scan, read-only, before you change anything

Start by finding out what depends on legacy markup or on what 3.0 removed. The Markup Migration Assistant reads your active theme and its parent, the must-use plugins folder where small code snippets often live, the Additional CSS and the classes of every form, and lists each finding with the file and line, a severity and a suggested modern equivalent. High findings are code that relies on something already removed; medium findings are CSS and code that stop matching when a form switches; low findings are deprecated but still working.

The read-only theme and code scan: findings in the child theme, its parent, a code snippet, the Additional CSS and the form classes, each with file and line, severity and a suggested modern equivalent
The read-only scan lists what would break, by file and line, with a severity and a suggestion. It never edits your files.

The scan only reads. It never edits a theme file, a snippet or the Additional CSS: you decide what to change, in your own editor or with your developer. Most CSS fixes are small: ul.gform_fields li.gfield becomes .gform_fields .gfield, input.gform_button becomes .gform_button.

2. Convert the old layout classes

The add-on converts the column Ready Classes to the modern layout: the fields of one legacy row share a row and get a width of 6, 4 or 3 of the 12 grid columns, and a row that was only half full keeps its empty half. Choice list classes such as gf_list_3col become the choice layout settings on Gravity Forms versions that have them. Classes without a modern setting, such as gf_inline, are never guessed: they stay on the field and are listed with a suggestion. The class list comes from our CSS Ready Class Picker add-on.

3. Preview each form side by side

Before switching, compare. The side-by-side preview shows a form rendered by Gravity Forms with legacy markup on one side and modern markup with the converted layout on the other, without saving anything.

The side-by-side preview of one form: on the left with legacy markup, on the right with modern markup and the converted column layout, and the list of changes
One form, side by side: legacy markup now, modern markup after the switch. Nothing is saved.

4. Dry run, then switch with a backup

A dry run lists every change per form, writing nothing. When you are happy, the bulk switch saves a timestamped backup of each selected form first, the complete stored form settings with a checksum, and then switches it. The switch takes a lock, so a double click or two administrators at the same time give one backup and one change.

5. Keep a way back

Every switch appears on the Backups tab. One click rolls back a form, or the whole batch, by writing the saved settings back exactly as they were. If a form was edited after the switch, the add-on tells you before undoing those edits too.

The Backups tab after a bulk switch: the batch with its date, each form with its timestamped backup and checksum, and the buttons to roll back one form or the whole batch
Each switch keeps a timestamped backup of every form it changed, with one-click rollback per form or per batch.

How this differs from other tools

Gravity Forms itself gives you the per-form toggle and a notice about Ready Classes. It does not scan your theme, convert the classes or keep a backup to roll back to. Among our own add-ons, GravityMigrate moves forms from other WordPress form plugins into Gravity Forms; the Markup Migration Assistant works on forms that are already Gravity Forms forms. The CSS Ready Class Picker helps you pick classes for a field; this add-on replaces the old layout classes with modern settings in bulk. Form Health checks form configuration, Find & Replace changes text across forms, and Form Sync and Form Blueprint copy forms.

A checklist for your site

  • List the forms that still use legacy markup, and any filter that forces it on.
  • Find CSS for ul / li fields, h3 titles and .validation_error in the theme, child theme, snippets and Additional CSS.
  • Find code for the spinner filters, the old date picker, submit input selectors and gform_price_change.
  • Convert the column and list Ready Classes; note the ones without a modern setting.
  • Preview the busiest forms, run a dry run, then switch with a backup.
  • Check the real pages, and roll back any form that needs more work.

Getting started

Moving off legacy markup is a good job for a quiet afternoon rather than a rushed one after an update. The setup guide walks through the scan, each severity, the conversion, the preview, the switch and the backups. The add-on works with Gravity Forms 2.9 and newer, is admin-only and makes no outside connection.

Know what will change before it changes. Get the Gravity Forms Legacy Markup & 3.x Migration Assistant and move your forms to modern markup with a backup and a way back.

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