Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Intercept specific Gravity Forms form submission and process it only if it's the one we want
* Intercept form submission and process it
function gf_intercept_form_submission( $data, $form ) {
if ( (int) $form['id'] !== (int) get_field( 'submit_project_gf_form_id', 'option' ) ) {
// Do something with $data
add_action( 'gform_after_submission', 'gf_intercept_form_submission', 10, 2 );

This comment has been minimized.

Copy link
Owner Author

@psaikali psaikali commented Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment