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:
1 | 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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 ;
}
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.