gform_export_form

Description

Allows modification of the form meta before export.

Usage

The following would apply to all forms:

add_filter( 'gform_export_form', 'modify_form_for_export', 10, 1 );

To target a specific form, append the form id to the hook name. (format: gform_export_form_FORMID)

add_filter( 'gform_export_form_1', 'modify_form_for_export', 10, 1 );

Parameters

Example

add_filter( 'gform_export_form', 'modify_form_for_export' );
function modify_form_for_export( $form ) {
$form['exported'] = true;
return $form;
}
add_filter( 'gform_export_form', 'modify_form_for_export' );
function modify_form_for_export( $form ) {
$form['title'] = 'Export of ' . $form['title'];
return $form;
}

Placement

This code should be placed in the functions.php file of your active theme.

Since

This filter was added in Gravity Forms version 1.8.8.

Source Code

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