How to redirect a contact form after submission

Tracy_Nicholas
New Member
1 0 0

Hi,

I've set up a contact form for a competition we are running and the form is currently redirecting to error message after submitting the form, even though the form is successfully submitting.

How can I get the form to redirect to a thank you page after submission - I've tried the code in this link: https://gist.github.com/carolineschnapp/3ae6ac982119fe248e6a and a few other things, but nothing is working.

Can anyone help please?

 

Thanks

0 Likes
Zigmo
Excursionist
22 0 38

I too cannot get the code in the link above to work.  Any help on this subject? 

0 Likes
Zigmo
Excursionist
22 0 38

Ok. I got it to work.  I had to put it inside the form tag.

0 Likes
NikesRP
New Member
1 0 0

do you need to paste that code in the theme.js file? I am not sure where to do this  

0 Likes
Cam-
Shopify Expert
169 0 41

Hi. You can use the following code to achieve this:

<input type="hidden" name="return_to" value="/pages/thank-you">

Add this to your contact form and change "/pages/thank-you" to the URL you want to redirect to.

Elkfox - The eCommerce Experts
0 Likes
Aaron_Macdonald
New Member
6 0 0

Hey Cam, I added this form re-direct to a Shopify Register Form, and it goes to the Captcha page, but doesn't initialize the re-direct. What am I doing wrong? or is this re-direct not applicable to Account Creation/Registration form?

0 Likes