Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
This is the legacy Gravity PDF v4 documentation which is NOT supported. Go to the latest documentation.
Jump To Section

Description #description

When Gravity Forms is in No-Conflict mode, along with enqueuing CSS using wp_enqueue_style() you also need to specifically register styles so they are loaded on Gravity Forms pages.

We’ve ensured any enqueued styles with a handle beginning with gfpdf_css are automatically registered, but you may need to register other WordPress styles. This filter allows you to easily register a WordPress CSS handler so it’s included on No Conflict Gravity Form pages.

Parameters #parameters

$items | array
The list of CSS handler currently being registered with Gravity Form’s No-Conflict mode.
By default any CSS handler beginning with gfpdf_css, and already enqueued, are registered on Gravity Forms pages. The following WordPress styles are also registered on Gravity PDF pages:
$default_styles = array(

Usage #usage

This example will register a core WordPress CSS file with Gravity Forms No-Conflict mode.

add_filter( 'gfpdf_gf_noconflict_styles', function( $items ) {

     * Register the WP Color Picker styles with
     * Gravity Forms No-Conflict Mode.
     * Note: You still need to call wp_enqueue_style( 'wp-color-picker' );
    $items[] = 'wp-color-picker';

    return $items;
} );

Source Code #source-code

This filter is located in the Router::auto_noconflict_styles() method of /src/bootstrap.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Gravity PDF 40K Active Installs Celebration! Take 20% off any products with coupon 40KMILESTONE (this week only)Visit Store
+ +
Scroll To Top

Choose your currency:

Converted prices are for reference only - all orders are charged in $ Australian Dollars ($) AUD.
  • AUDAustralian Dollars ($)
  • USDUS Dollars ($)
  • CADCanadian Dollars ($)
  • EUREuros (€)
  • GBPPound Sterling (£)
  • NZDNew Zealand Dollar ($)
  • JPYJapanese Yen (¥)