PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

gform_confirmation needs to go after gform_after_submission

  1. Hi,

    I have a problem.
    I added:

    add_action("gform_after_submission", "create_submission", 10, 2);
    add_filter("gform_confirmation", "custom_confirmation", 10, 4);

    In my create_submission() I added code so it will store the submitted data into a separate post_type, and after that, I want to redirect it to a url that looks like this: ?eventid=2310&key=68735ed2d8f88cea
    But gform_confirmation loads and redirects before gform_after_submission. So what happened is that it redirects to an older lead, 1 lead before the new one instead to the newest lead.

    How can I solve that?

    Thanks!

    Posted 11 years ago on Wednesday February 13, 2013 | Permalink
  2. Nobody?

    Posted 11 years ago on Wednesday February 13, 2013 | Permalink
  3. gform_after_submission runs after the post is created, entry is created, notifications are sent, confirmation is shown, etc. You won't be able to change the URL where you are redirecting the visitor to using gform_after_submission.

    Can you create your post using gform_pre_submission instead of gform_after_submission, then pass the redirect URL to gform_confirmation?

    Also, can you show the code you are using for create_submission?

    Posted 11 years ago on Saturday February 16, 2013 | Permalink