Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
Jump To Section

Description #description

By default, Gravity PDF will include the aggregate data for Survey / Poll / Quiz fields for all entries in your Gravity Form. When you have a lot of entries this can take considerable time to process. This filter allows you to disable this functionality.

Version #version

This filter was added in Gravity PDF 5.1.

Parameters #parameters

$disable | bool
Set to “true” to disable global add-on data
$form | array
The current Gravity Forms form array
$options | array
The global query options to poll for the data
$fields | array
The Gravity Forms fields we are polling data for

Usage #usage

This snippet will show you how to disable the aggregate data for all PDFs:

add_filter( 'gfpdf_disable_global_addon_data', '__return_true' );

This snippet will show you how to disable the aggregate data for all PDFs of a particular Gravity Form:

add_filter( 'gfpdf_disable_global_addon_data', function( $disable, $form, $options, $fields ) {
    if ( $form['id'] === 5 ) {
        return true;
    }

    return $disable;
}, 10, 4 );

Source Code #source-code

This filter is located in the Model_PDF:get_addon_global_data() method of /src/model/Model_PDF.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Scroll To Top

Choose your currency:

Close
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 (¥)