Description
The gform_form_settings_page_{VIEW} action in Gravity Forms adds custom pages (i.e. “views”) to the Form Settings section. This hook is used by Gravity Forms add-ons to add their settings pages.
Usage
Specify the view name after the gform_form_settings_page_ part of the hook name:
add_action( 'gform_form_settings_page_VIEW', 'my_custom_function' );
Parameters
There are no parameters for this action.
Examples
This example demonstrates how to display page content for menu items added via the gform_form_settings_menu filter using the gform_form_settings_page_view hook. Note that the VIEW in the hook name is variable and should be replaced by your page name.
// add a custom menu item to the Form Settings page menu
add_filter( 'gform_form_settings_menu', 'my_custom_form_settings_menu_item' );
function my_custom_form_settings_menu_item( $menu_items ) {
$menu_items[] = array(
'name' => 'my_custom_form_settings_page',
'label' => __( 'My Custom Form Settings Page' )
);
return $menu_items;
}
// handle displaying content for our custom menu when selected
add_action( 'gform_form_settings_page_my_custom_form_settings_page', 'my_custom_form_settings_page' );
function my_custom_form_settings_page() {
GFFormSettings::page_header();
echo 'My Custom Form Settings!';
GFFormSettings::page_footer();
}
Source Code
This filter is located in GFFormSettings::form_settings_page() form_settings.php.