Forum
Reuse input data from form within success
Is it possible to output the data from a form within the success message or indeed elsewhere?
For example within the form:
<perch:input type="checkbox" id="priceSelect" value="<perch:content id="price"/>">
Then in the success message out put the price that was entered:
<perch:success>
<perch:input id="priceSelect" />
<input type="hidden" name="amount" value="<perch:input id="priceSelect" />">
</perch:success>
This obviously outputs another input box, albeit with the correct data within it. How can I get that data into a regular <perch:content> field?
Is this possible? Any way to display the data that has been entered into a form within the success message?
You'd need to grab the value from
$_POST
and pass it back into the template in order to do that.Excellent! Thank you for pointing me in the right direction.
Used this to pass data down so essentially had one form that passes data into the CMS but also populates the success message where there is an option to go to PayPal to make the payment.