gform_frontend_page_visible

Description

The gform_frontend_page_visible JavaScript action hook is used to perform custom actions when a page step is made visible by conditional logic on the front-end.

Usage

The filter which runs for all would be used like so:

gform.addAction( 'gform_frontend_page_visible', function( page, formId ) {
    //do something
}, 10, 2 );

You can also target a specific form by adding the form id after the hook name.

gform.addAction( 'gform_frontend_page_visible_6', function( page, formId ) {
    //do something
}, 10, 2 );

Parameters

Examples

Log the parameters

This example would log the contents of the three parameters to the browser console.

gform.addAction( 'gform_frontend_page_visible', function( page, formId ) {
    console.log( arguments );
}, 10, 2 );

Placement

This code should be placed in a theme custom JS file or a custom JS functions plugin.

Since

This filter was added in Gravity Forms v2.5.

Source Code

This filter is located in GFPageConditionalLogic.showPage() in page_conditional_logic.js.