What's your biggest current challenge? Have your say in Community Polls along the right column.

Redirect SUBMIT button in a contact form to a Thank you page

Redirect SUBMIT button in a contact form to a Thank you page

PS7
New Member
9 0 0

Hi,

 

I am hoping one of you legends can help me with the following.

 

I am using Flex 3.3.0 and have a contact form on a landing page (for a competition). I would like to have the submit button redirect to a thank you page.

 

Is there something I can put in the Custom CSS to achieve this?

 

Thanks,

 

Peter

Replies 7 (7)

pawankumar
Shopify Partner
627 93 115

Hi,
I hope you are doing well.
You can do this by setting a return_to url like this:

{% form 'form_type', return_to: "your-thankyou-page-url-here" %}

I hope, It helps you.
Thanks!

 

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan
PS7
New Member
9 0 0

Thanks, Pawankmar. I just tried that, and it didn't work, unfortunately.

pawankumar
Shopify Partner
627 93 115

Can you please share store URL and contact us page URL so that I can check this on my side. Please provide password as well if it is password protected
Thanks!

- Need a Shopify developer? Chat on WhatsApp +91-9467121281
- Coffee Tip: Buymeacoffee  | Email: thepkpawankumar@gmail.com
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Best regards,
Pawan

harryperry
Shopify Partner
2 0 0

 

  • In your Shopify store's backend, go to Settings > Checkout.

  • Scroll down to the "Order processing" section and look for the "Additional content & scripts" field.

  • Add the following code to the "Additional content & scripts" field:

    <script> Shopify.onItemAdded = function(line_item) { window.location.href = 'https://your-thank-you-page-url.com'; }; </script>

    Replace https://your-thank-you-page-url.com with the URL of your "Thank You" page.

 

  1. Save the changes.

This code will redirect the user to the "Thank You" page when a successful payment is made. Please note that this code assumes that the user is redirected to the "Cart" page after clicking the "Checkout" button, and the user is not using a third-party payment gateway. If your store uses a different payment flow, you may need to modify the code accordingly.

PS7
New Member
9 0 0

Hi Harryperry, thank you for your reply but I think you have misunderstood my question. I am not after a redirection after a purchase. I am after a redirection from the submit button on a contact form.

PS7
New Member
9 0 0

Hi Harryperry, thank you for your reply but I think you have misunderstood my question. I am not after a redirection after a purchase. I am after a redirection from the submit button on a contact form.

Jferguson1
Explorer
80 3 6

I trying to do the same exact thing - did you manage to work out what code to put in? Thanks