Description
The gform_print_entry_disable_auto_print filter is used to disable auto-print when the Print Entry view has fully loaded.
Usage
The following would apply to all forms.
add_filter( 'gform_print_entry_disable_auto_print', 'your_function_name', 10, 2 );
To target a specific form, append the form id to the hook name. (format: gform_print_entry_disable_auto_print_FORMID)
add_filter( 'gform_print_entry_disable_auto_print_1', 'your_function_name', 10, 2 );
Parameters
| Parameter | Type | Description |
|---|---|---|
false | bool | Auto print is enabled by default. Set to true to disable. |
$form | Form Object | Current form object. |
Example
Disable auto-print.
add_filter( 'gform_print_entry_disable_auto_print', '__return_true', 10, 2 );
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?
Since
This filter was added in Gravity Forms version 1.9.14.16.
Source Code
This filter is located in print-entry.php.