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_post_submission hooks executed after confirmation redirect

  1. I typically like to set the confirmation page to another WordPress page but this doesn't allow for the use of the gform_post_submission hooks as the confirmation redirect happens before the hooks are called. Is there a good reason for this? Essentially, if I want to hook into the post submission I have to use the text confirmation message. In form_display.php on line 75:

    header("Location: {$confirmation["redirect"]}");
    do_action("gform_post_submission", $lead, $form);
     do_action("gform_post_submission_{$form["id"]}", $lead, $form);

    Why would it not be:

    do_action("gform_post_submission", $lead, $form);
    do_action("gform_post_submission_{$form["id"]}", $lead, $form);
     header("Location: {$confirmation["redirect"]}");

    I looked over the forum best I could but didn't see anyone mention of this nor can I imagine why you'd want to prevent this hook if the confirmation message is a redirect.

    Posted 13 years ago on Thursday July 7, 2011 | Permalink