Quantcast
Channel: Styles/Scripts Archives - Gravity Forms Documentation
Viewing all articles
Browse latest Browse all 13

gform_disable_css

$
0
0

Description

The filter gform_disable_css can be used to disable all CSS files from being loaded on the frontend.

This includes styles which handle conditional logic, columns, hidden fields, ready classes, etc.

Usage

add_filter( 'gform_disable_css', 'your_function_name' );

Parameters

  • $is_css_disabled bool

    Indicates if CSS files are to be loaded by Gravity Forms. Default is false.

Example

Disable loading of CSS files

This example would disable all loading of CSS files for all forms.

add_filter( 'gform_disable_css', '__return_true' );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Since

This filter was added in Gravity Forms v2.8.

Source Code

This filter is located in form_display.php and includes/blocks/class-gf-block-form.php and
includes/form-display/class-gf-form-display-service-provider.php
and
includes/system-status/class-gf-system-report.php
.

The post gform_disable_css appeared first on Gravity Forms Documentation.


Viewing all articles
Browse latest Browse all 13

Trending Articles