New Window Thank You Page after successful Contact Form Submission

CarlinWentzel1
New Member
4 0 0

Good day!

 

Please assist me. On my "Contact Us" page I have a Contact Form. Upon Successful completion I want the page to redirect to a "Thank You" page. I manually created this page and it basically just says Thanks for filling out the form successfully, but I need the URL for tracking purposes. 

 

I don't know where to paste the code. I am not an HTML expert. What I have, but it is not working is:

 

window . location = " and then the instruction to open the page"; 

 

Where can I paste this code or edit the instruction that once the form has been filled in successfully, I want an instruction to open my custom Thank You page. 

 

Please assist me, thank you!

Replies 6 (6)

Dbuglabpvtltd
Shopify Partner
705 75 113

Hi @CarlinWentzel1 

You have to use jquery code once form submit.

You have to detect  form is submitted or having error using js then you can add that redirect code.

banned
CarlinWentzel1
New Member
4 0 0

Hi!

 

Thank you. You don't perhaps have a code snippet I can insert to instruct the page to open Please?

Dbuglabpvtltd
Shopify Partner
705 75 113

@CarlinWentzel1 

Sorry currently I haven't the code snippet, need to create new one for this according to theme, It will take time.

banned
CarlinWentzel1
New Member
4 0 0

Hi

 

Thanks, I Understand. Is there any way I can ask someone at Shopify to send me a quote how much it will cost to create this for me? I need it, and I am willing to pay. Not sure what route to go? I know very few coders who wants to work in Shopify here where I live. 

 

iamabeginner
Tourist
9 0 6

in the contact-form.liquid file, search for this line

{%- if form.posted_successfully? -%}

and below it paste this line and insert the url of your page

<script>window.location = "https://www.learningaboutelectronics.com/images/Arduino-LED-flasher-circuit.png"; </script>.

This will do the trick

 

 

HeadhunterGear
Visitor
1 0 1

Thank you this worked perfectly for me!