I have a Gravity Forms multi-step form. I need to run my own function when the form is submitted so I'm using the GF hook 'gform_after_submission'
The hook works perfectly on forms that do not utilize AJAX. Since the multi-step form uses AJAX; upon clicking on 'Submit', the form doesn't do anything and the spinner keeps loading.
I know if I could disable AJAX on submit then it would work but there's nothing in GF documentation that shows how I can disable AJAX on form submit (because I still need AJAX for going back and forth the form).
add_action( 'gform_after_submission_1', 'client_registration_process', 10, 2 );
function client_registration_process( $entry, $form ) {
if ( !empty($form) ) {
echo "<pre>";
print_r( $form );
echo "</pre>";
die;
}
}
Please suggest how I can overcome this issue. Thanks!