Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
Gravity PDF v4 will receive bug fixes and security updates until October 4, 2019, however it's recommended you upgrade to v5 as soon as practical.
Jump To Section

Description #description

This option allows you to override individual global PDF settings when they are accessed.

You also have the option to use the gfpdf_get_option_$option filter, where $option is the global setting ID.

Parameters #parameters

$value | mixed
The PDF settings
$key | string
The current Gravity Form ID the PDF is being added to
$default | mixed
The ID of the current PDF being processed

Usage #usage

The following snippet shows how you can change a global PDF setting option:

add_action( 'gfpdf_get_option', function( $value, $key, $default ) {
    /* Let's change the default template value when it's requested */
    if( 'default_template' == $key ) {
        $value = 'rubix';
    }

    return $value;
}, 10, 3 );

You can also specifically target an option:

add_action( 'gfpdf_get_option_default_template', function( $value, $key, $default ) {
    $value = 'rubix';
    return $value;
}, 10, 3 );

Source Code #source-code

This filter is located in the Helper_Abstract_Options::get_option() method of /src/helper/abstract/Helper_Abstract_Options.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 (¥)