The gform_export_page_VIEW Gravity Forms PHP action allows you to add custom pages (i.e., “views”) to the Import/Export section in Gravity Forms.
Usage
To use the action, specify the view name after the gform_export_page_ hook name:
add_action('gform_export_page_my_custom_page', 'my_custom_function');
Parameters
There are no parameters for this action.
More information
See Gravity Forms Docs: gform_export_page_VIEW
Source code for this action is located in GFExport::export_page() in export.php.
Examples
Add a custom page to the Import/Export section
This example demonstrates how to display the content for your custom page and also how to add a menu item to link to this custom page on the Import/Export section using the gform_export_menu filter.
// Add a menu item with the 'gform_export_menu' filter
add_filter('gform_export_menu', 'my_custom_export_menu_item');
function my_custom_export_menu_item($menu_items) {
$menu_items[] = array(
'name' => 'my_custom_export_page',
'label' => __('My Custom Export Page')
);
return $menu_items;
}
// Display the content of the custom page
add_action('gform_export_page_my_custom_export_page', 'my_custom_export_page');
function my_custom_export_page() {
GFExport::page_header();
echo 'My Custom Export Page Settings!';
GFExport::page_footer();
}