| CARVIEW |
Select Language
HTTP/2 301
date: Mon, 29 Dec 2025 01:13:00 GMT
content-type: text/html; charset=UTF-8
location: https://docs.gravityforms.com/gform_disable_form_legacy_css/
server: cloudflare
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
x-redirect-by: WordPress
fastcgi-cache: MISS
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=ADiRPUqoviz1JWmqc881Lh3gfglyRelqx0S8caARpLF7kymUDWlAzKuIyT9z%2BeM5tHjuWHH6RKO91DOhP%2BZjtz7Kc6a%2FGXDVWJ6qG2SZPBMitwNS"}]}
cf-ray: 9b556ea918dce084-BLR
HTTP/2 200
date: Mon, 29 Dec 2025 01:13:00 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
vary: Accept-Encoding
strict-transport-security: max-age=604800
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
x-xss-protection: 1; mode=block
x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
content-security-policy: frame-ancestors 'self';
referrer-policy: no-referrer
referrer-policy: strict-origin-when-cross-origin
link: ; rel="https://api.w.org/"
link: ; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
fastcgi-cache: HIT
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=4sU0oN1PYAlTlM4QVjJmBLyhY5npFm4uj4wttzn4PgKOHjCaaKzZwjZrnbg9228WVPUHBfKFWETvwBseOUOinq6YUWO2kfRw7RTjI4IO%2F9%2FnY%2Brh"}]}
cf-cache-status: DYNAMIC
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
content-encoding: gzip
cf-ray: 9b556eafcc70e084-BLR
gform_disable_form_legacy_css - Gravity Forms Documentation
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.