About Legacy Markup

Definition

Legacy markup is a term we use to identify the markup code and practices that existed in Gravity Forms before version 2.5 of our core product.

Purpose

Gravity Forms 2.5 was a significant transition to more modern markup, and we overhauled the existing methods and styles to accommodate many accessibility enhancements, abandon some bad habits we have had for years, and provide us with a more flexible and nimble methodology that can support upcoming features.

The legacy markup Form Setting was automatically enabled for existing forms upon upgrade to Gravity Forms 2.5 or later. It was designed to allow backward compatibility with that release for millions of existing forms. New forms are created with the newer “modern markup” (legacy markup setting disabled), but legacy markup can be enabled for a newly created form if circumstances require it.

Refer to this summary article for more information on the markup changes in Gravity Forms 2.5

Legacy Markup Toggle

The use of legacy markup is toggled within the Form Settings. Finding out if your form uses Legacy Markup is as easy as checking if your form has this setting enabled.

This article shows you where to find the setting.

Note: The Legacy Markup Toggle will only be available when you have a form on this particular installation with Legacy Markup enabled. For new installations or installations where there are no forms with Legacy Markup Enabled, the Legacy Markup Toggle will not display. Importing a form with Legacy Markup will allow the toggle to be enabled or disabled and you can also manually enable Legacy Markup using the gform_enable_legacy_markup filter if necessary.

A new warning is also added to the Legacy Markup Toggle to advise incompatibility with the Orbital Theme:

Image showing the legacy markup toggle enabled.

How To Disable Legacy Markup

To disable the legacy markup, use the toggle in the Enable legacy markup section of your Form → Settings and in this article.

Image showing the legacy markup toggle disabled.

Note: When disabling legacy markup, if your form uses CSS Ready Classes or another legacy markup style, the Form Editor will show a message at the top.

Image showing Legacy Markup deprecation notice

Moving Forward

Although we recognize and support the need for backward compatibility, it is important to note that this does not imply forward compatibility.

Legacy markup will not be updated to support future functionality.

As such, forms continuing to use the legacy markup option will not have complete access to new features. Some features will require the newer markup to function. You may also be presented with the following admin notice to warn you of this when legacy markup is enabled.

Image showing Legacy Markup warning in the form editor.

For example, the following features cannot be used while the legacy markup mode is set to on.

What Can You Do?

We recommend that all new forms use modern markup wherever possible.

We also recommend that any time you need to make a major update to an existing form that uses legacy markup, evaluate whether legacy markup can be switched off. Do this on a sandbox or test environment, then any regular testing you had planned for the form updates can also test the changes made to markup, confirming no negative effects in layout or theme support. Once completed, this ensures the most flexibility and ongoing support for your form.