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 group products in a table at the end of a PDF. This filter allows you hide that table in the PDF.

Version #version

This filter was added in Gravity PDF 5.1.

Parameters #parameters

$disable | bool
Set to “true” to disable global add-on data
$entry | array
The current Gravity Forms entry array
$form | array
The current Gravity Forms form array
$config | array
The current PDF configuration
$products | array
The Field_Products object

Usage #usage

This snippet will show you how to disable the Product table in PDFs:

add_filter( 'gfpdf_disable_product_table', '__return_true' );

This snippet will show you how to disable the Product table in PDFs for a particular Gravity Form:

add_filter( 'gfpdf_disable_product_table', function( $disable, $entry, $form, $config, $products ) {
    if ( $form['id'] === 5 ) {
        return true;
    }

    return $disable;
}, 10, 5 );

Source Code #source-code

This filter is located in the View_PDF:generate_html_structure() method of /src/view/View_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 (¥)