gform_zap_before_save

gform_zap_before_save

DescriptionUsageParametersExamplesPlacementSource Code

Description
The 「gform_zap_before_save」 filter allows changes to be made to the Zapier feed setup before it is saved to the database.
Usage
The following would apply to all forms:
add_filter( 'gform_zap_before_save', 'your_function_name', 10, 2 );

To target a specific form, append the form id to the hook name. (format: gform_zap_before_save_FORMID)
add_filter( 'gform_zap_before_save_1', 'your_function_name', 10, 2 );

Parameters

$zap Feed Object
The feed object.

$form Form Object
The form object.

Examples
add_filter( 'gform_zap_before_save', 'change_zap', 10, 2 );
function change_zap( $zap, $form ){
$zap['name'] = "Test Zap";
return $zap;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GFZapier::zapier_edit_page() in gravityformszapier/zapier.php.

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註