Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Intercept specific Gravity Forms form submission and process it only if it's the one we want
<?php
/**
* 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' ) ) {
return;
}
// Do something with $data
}
add_action( 'gform_after_submission', 'gf_intercept_form_submission', 10, 2 );
@psaikali

This comment has been minimized.

Copy link
Owner Author

psaikali commented Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.