Closed planktonWD closed 7 years ago
When you handle your form manually, you also need to handle the redirect and displaying text, manually. There's no way that the plugin can do this automatically for you, as it does when you call the displayForm
function.
Take a look at the template that is used for the displayForm
function, and you see an example of how to solve your situation.
Template path: amforms/templates/_display/templates/form.twig
Thanks so much @hubertprein I popped this in my template to use the default response that I put in the admin area of Craft:
{% if craft.request.getParam('submitted') == form.handle %}
<p>{{ form.afterSubmitText|default('Thanks for your submission.'|t) }}</p>
{% else %}
...form code as in my previous comment
{% endif %}
I am redirecting to the same page and showing text. When I use the default template code:
The text shows fine and the form doesn't show which is to be expected.
However when I use my own template code:
The page refreshes and the form shows. The form does save to my submissions though so seems to work just no confirmation text?
Thanks!