gform_preview_header

Description

The “gform_preview_header” action is triggered when the header of the form preview page loads, allowing further actions to be done.

Usage

add_action( 'gform_preview_header', 'my_function', 10, 1 );

Parameters

  • $form_id int
    The ID of the current form being previewed.

Examples

function my_function() {
    //Do something here
}
add_action( 'gform_preview_header', 'my_function', 10, 1 );

Since

This action hook was added in Gravity Forms 2.4.19

Source Code

This action hook is located in preview.php.