I am trying to use Contact Form 7 to redirect the user to a new page that thanks them and offers more info once the form has successfully been filled.
How can I pass the $_POST[]
vars through? I couldn’t find anything on Google.
Edit:
I am also trying to use the form to pre-populate a PayPal buy it now button.
According to
Contact Form 7 documentation
you have to set a JavaScript action hook. By using this hook, you can specify a JavaScript code that you wish to run after the form is successfully submitted. You will find the Additional Settings field at the bottom of the contact form management page. Simply insert the following line into it:If you want you can use following code to redirect to a new page with variables but it will send the variables to the
$_GET
You can retrieve the variable as follows
Read more, also check add_query_arg.