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. Gravity Forms moved to a more modern markup approach in Gravity Forms 2.5, and legacy markup is scheduled for removal.
Deprecation Warning
⛔ Legacy markup is scheduled to be removed from Gravity Forms with the release of Gravity Forms 3.1. When deprecated, the forms will default to standard markup, operating as if the legacy mode setting has been disabled. This transition may introduce issues if your site has existing custom code that depends on the legacy markup structure.
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:
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.
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.
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.
Legacy markup is scheduled to be removed from Gravity Forms with the release of Gravity Forms 3.1.
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.
For example, the following features cannot be used while the legacy markup mode is set to on.
- The column feature of the Form Editor, where a user can drag content into columns.
- Some Submit button settings will not function. The Appearance settings of Submit Button Width and Submit Button Location will work in the editor but will not display as expected on the front end
- Conversational Forms created through the Conversational Forms Add-On do not support Legacy Markup.
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.
Make sure you complete this review and update process before the release of Gravity Forms 3.1, when legacy markup will be removed.