Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
Jump To Section

Description #description

Use this filter to remove (or add) links to the list of PDFs shown on the Entry List and Entry Details pages.

Version #version

This filter was introduced in Gravity PDF 4.2.

Parameters #parameters

$args | array
An associative array containing the keys name, view and download which signify the name of the PDF and the URLs to view or download the document.
$entry | array
The raw Gravity Form Entry array.
$form | array
The Gravity Forms array

Usage #usage

Use the following code to remove a PDF with the ID 5886dcb38f30b:

add_filter( 'gfpdf_get_pdf_display_list', function( $args, $entry, $form ) {
    return array_filter( $args, function( $pdf ) {
        return strpos( $pdf['url'], '5886dcb38f30b' );
    } );
}, 10, 3 );

Or, add your own link to the PDF list with the following:

add_filter( 'gfpdf_get_pdf_display_list', function( $args, $entry, $form ) {
    $args[] = [
        'name'     => 'Additional PDF',
        'view'     => 'https://example.com/document.pdf',
        'download' => 'https://example.com/document.pdf',
    ];

    return $args;
}, 10, 3 );

Source Code #source-code

This filter is located in the Model_PDF::get_pdf_display_list() method in /src/model/Model_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 (¥)