[Solution] How To Redirect Shopify Contact Form To Thank You Page?

After successfully submitting the contact form, a message will be displayed in Shopify. One commonly asked topic by store owners or developers that how to redirect users to a URL or website once they successfully complete a contact form. In this tutorial, I’ll also show you how to redirect a visitor to another page or website when they successfully submit a form.

This means you may direct them to the thank you page or promotion landing page that is most relevant to their needs.

It’s extremely simple; simply open the form code in your theme file which could be of names such as contact.liquid or newsletter.liquid or contact_form.liquid and put the following code inside the form tag.

 

If You Want To Redirect the Shopify form to the Internal Thankyou Page

{%- if form.posted_successfully? -%}
<script>
window.location = “/pages/thankyou-webymasters”;

/* Replace the slug with your page: WebyMasters */
</script>
{%-endif -%}

 

If You Want To Redirect the Shopify form to the Internal Thankyou Page

{%- if form.posted_successfully? -%}
<style>body{display:none!important!}</style>
<script>window.location.replace(“http://webymasters.com”);</script>

/* Replace the URL with your link: WebyMasters */

{%-endif -%}

 

 

Let me know if you have any issues or doubts.

 

 

 

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *