gform_print_entry_header

Description

This action hook can be used to add a custom header to the print entry screen.

Usage

add_action( 'gform_print_entry_header', 'custom_header', 10, 2 );

Parameters

ParameterTypeDescription
$formForm ObjectThe current form.
$entryEntry ObjectThe current entry object.

Examples

This example adds a custom header to the Print Entry screen.

add_action( 'gform_print_entry_header', 'custom_header', 10, 2 );

function custom_header( $form, $entry ) {
    echo "<h2>Date and Time: " . esc_html( $entry['date_created'] ) . "</h2>";
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Source Code

This filter is located in print-entry.php.