Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Created October 10, 2016 19:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjohnson/5457d25b234add009f415320d051c990 to your computer and use it in GitHub Desktop.
Save kjohnson/5457d25b234add009f415320d051c990 to your computer and use it in GitHub Desktop.
<?php
add_action( 'ninja_forms_after_submission', 'my_ninja_forms_after_submission' );
function my_ninja_forms_after_submission( $form_data ){
// Do stuff.
}
@BogusException
Copy link

Kyle,
Ninja forms stays "Processing" during this function's running... I've tried all kinds of "return" statements, but nothing works...

I'm adding data to another database table, but how can I signal calling function that this one is done OK?

@jwhite78
Copy link

@BogusException and @kyle, I am having the same issue. Please help.
Thank you,
Joe

@imarem
Copy link

imarem commented Feb 9, 2017

I'm having the same problem.
In my case, I try to redirect to another page after_submission hook, with the form value params from the server side, because if i use redirect with key-value params doesnt have any security.

Please help

Copy link

ghost commented Apr 20, 2017

This is because the action is misleading.
The action is called at the end during the AJAX submission request.
So everything you echo will be in the returning answer and will probably break it.

Submission.php -> action

@raphcadiz
Copy link

@kyle I have same exact problem. I tried executing a function using this hook that doesn't return anything, some the button just stay on processing condition. When I check the network request I can still see thank you message in there http://take.ms/UdJed
img

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