Version: 5
CAUTION
️Version 5 of Gravity PDF does not have full support for Gravity Forms 2.5 and you should consider upgrading to version 6. If you cannot, version 5 will still function but have a degraded admin experience. Support and bug/security fixes will be provided until 27 April 2023.gfpdf_post_html_fields
Description
This filter can be used to insert HTML mark up after the entry HTML markup has been generated.
Version
This action was introduced in Gravity PDF 4.1.
Parameters
$entry | array
- The Gravity Form entry array
$config | array
- The current Gravity PDF settings array
Usage
This snippet will display a message after the PDF field HTML markup:
add_action( 'gfpdf_post_html_fields', function( $entry, $config ) {
echo 'This is a notice that is displayed after 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_post_html_fields', function( $entry, $config ) {
if ( $entry[1] === 'Yes' ) {
echo 'This is a notice that is displayed after the PDF content';
}
}, 10, 2 );
Source Code
This filter is located in the process_html_structure()
method of /src/view/View_PDF.php
.