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

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