gform_print_entry_notes

Description

The gform_print_entry_notes filter allows printing of entry notes to be overridden as the entry markup is being prepared for the print view.

Usage

The following would apply to all forms:

add_filter( 'gform_print_entry_notes', 'your_function_name', 10, 3 );

Parameters

  • $print_entry_notes bool

    Indicates if printing of notes was enabled via the entry list or detail pages.

  • $entry Entry Object

    The current entry.

  • $form Form Object

    The current form object.

Examples

Always include the notes

add_filter( 'gform_print_entry_notes', '__return_true' );

Always exclude the notes

add_filter( 'gform_print_entry_notes', '__return_false' );

Invert the choice selected in the admin

add_filter( 'gform_print_entry_notes', function ( $print_entry_notes ) {
    return ! $print_entry_notes;
} );

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms version 2.4.17.

Source Code

This filter is located in gform_default_entry_content() in print-entry.php.