• I am creating a form in which the user will enter 3 values – name, company, access code. Based off the access code, I want to redirect the user to a different page.

    My client will be adding new access codes all the time, so I have set this up as a custom post type with just these three attributes as post meta data. So when the user submits the field, the wpcf7_validate_text hook validates the access code, and this is working. In a second function using the wpcf7_mail_sent hook, I am trying to do the redirect. I got it to the point that the function retrieves the redirect URL from the post meta data, but cannot make the function actually redirect the user to the new page.

    From my google searches, it seems that this is because I cannot add a redirect after the header has been loaded. But I do not know the redirect when the header is loaded, because the user has not submitted the form yet.

    Any help on how to do finish this?

    https://www.ads-software.com/plugins/contact-form-7/

  • The topic ‘External Redirect After Mail Sent’ is closed to new replies.