gform_export_page_VIEW

Description

Add custom pages (i.e. “views”) to the Import/Export section.

Usage

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.

Examples

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 via the gform_export_menu filter.

// let's add our menu item first 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;
}

// now let's display the the content of our 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();

}

Source Code

This filter is located in GFExport::export_page() in export.php.