I'm trying to insert a next attribute into a form to redirect customers to different places depending on the stage in the registration process. However no method I try is inserting the next attribute dynamically:
Set the status as a system variable depending:
Check for the value of the status:
- <perch:form id="register" class="customerDetails" method="post" app="perch_shop" <perch:if id="status" value="checkout" match="eq">next="/shop/checkout"</perch:if>>
- <h4>New Customers</h4>
- <perch:if id="status" value="checkout" match="eq">Redirect back to checkout</perch:if><!--This shows the code-->
The if statement works in the body of the form, but not in the opening tag. It does not redirect back to the checkout.
I've tried setting the redirect as a variable and passing it in:
This does not work either.
Only hard coding the next attribute into the template works, but this means I have to maintain separate templates for all of the redirect scenarios.