I have a form where I am redirecting customers to a different page depending on which option they select in one of the fieldsets. I am trying to use the {% if form.posted_successfully? %} hook to trigger the page redirect, but it is not working correctly. It just brings the page to a “prove you are not a robot” page and then back to the same form page. It appears that the {% if form.posted_successfully? %} is not being triggered. This is how my page looks.
# {{ page.title }}
{{ page.content }}
{%- assign formId = 'RegisterForm' -%}
{% form 'contact', id: formId %}
{% include 'form-status', form_id: formId %}
{%- if form.errors -%}
{{ form.errors | default_errors }}
{%- endif -%}
Please provide each attandee's name, email, phone, salon address, Instagram, and TikTok handle
Add Fields
{% if form.posted_successfully? %}
{% endif %}
{% endform %}
If I use an onclick() method my page redirects work correctly. Here is an example:
Test Redirect
I need this page to submit the information to be stored in Shopify so I can receive emails with information from this form.