gform_disable_form_legacy_css

Description

The gform_disable_form_legacy_css filter allows the CSS to be disabled for forms using the legacy markup, usually forms created with Gravity Forms 2.4 and earlier.

Usage

The filter which would run for all forms using the legacy markup would be used like so:

add_filter( 'gform_disable_form_legacy_css', 'your_function_name' );

Parameters

  • $disabled bool

    Whether to disable the CSS.

Examples

1. Disable the CSS

add_filter( 'gform_disable_form_legacy_css', '__return_true' );

Placement

This code should be placed in the functions.php file of your active theme or a custom functions plugin.

Since

This filter was added in Gravity Forms v2.5.

Source Code

This filter is located in GFFormDisplay::get_form_enqueue_assets() in form_display.php.