How do I redirect customers to a certain page after filling out a form?

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.

1 Like

I realized I am using the contact form on two pages. Will this lead to issues? I noticed when testing my contact form it brings me to the registration form page. I basically have two forms on my store. There is the Contact Us page and then there is a Register page for capturing information about our client. The register page is using the contact form as well. I need the register page, which is shown above, to save the information and email the information over to us.

Did you ever manage to work out how to automatically redirect users once they submit? Thanks