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 filter can be used to insert HTML mark up before the entry HTML markup has been generated.

Version #version

This action was introduced in Gravity PDF 4.1.

Parameters #parameters

$entry | array
The Gravity Form entry array
$config | array
The current Gravity PDF settings array

Usage #usage

This snippet will display a message before the PDF field HTML markup:

add_action( 'gfpdf_pre_html_fields', function( $entry, $config ) {
   echo 'This is a notice that is displayed before the PDF content';
}, 10, 2 );

If you want to display a message when a particular value is entered into the form use the $entry array:

add_action( 'gfpdf_pre_html_fields', function( $entry, $config ) {
    if ( $entry[1] === 'Yes' ) {
        echo 'This is a notice that is displayed before the PDF content';
    }
}, 10, 2 );

Source Code #source-code

This filter is located in the process_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 (¥)