Sending form data to the thank you page after submission

Permalink
I'm using the standard form block and have set up a thank you page after submission.
I need the data from one of the form fields in order to supply the correct link for the customer on the thank you page.

I thought i could just use the $_POST array but it is always blank

Any thoughts/suggestions on how this could be done?

I'm using version 8

Thanks,

Dale

 
mnakalay replied on at Permalink Best Answer Reply
mnakalay
Hello,
When setting your form you have 2 options:
1- redirect to a thank you page
2- reload the page where the form is and show a thank you message

In the first case (your situation) nothing is sent to the page
In the second case, you would have access to the question set ID which should allow you to get the data from the database and do what you need with it.

So you could either use the second solution and have your code in the page where the form is. Or you could try to have the data you need saved on form submit (in session, in a cookie, in local storage if you want to use javascript) and then write your code on the other thank you page to retrieve it.
Area55 replied on at Permalink Reply
Thanks, I ended up going the javascript route