Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Create your own ecommerce website and start selling successfully with ShopWired today

Create your ecommerce website on ShopWired today.
Start today with 14 days free

Changing the contact us form to submit to a thank you page

Theme Customisations - Coding
18th February 2021

Before you proceed:
The following article contains information that requires you to have some prior knowledge about coding in order to correctly implement the proposed change to your theme. If done incorrectly alterations made to your theme’s code can negatively impact your website causing visual and performance issues. Therefore, we strongly recommend that you only undertake this effort if you are completely confident that you know what you’re doing. If you have no coding experience at all, aren’t entirely comfortable following the instructions in this article or if you simply don’t understand the instructions then we recommend you instead contact our partners, Coding Masters, who will complete the work for you for a set fee.


When visitors to your website complete the form on the contact us page, the platform will respond with a success message. However, there may be times where you want the user to be redirected to another page (like a 'thank you' page), for example if you want to track form submissions as a conversion.

To change the form to submit to another page you'll need to make some changes to the contact us form using the page editor.

Open the contact.twig file and find the closing </form> tag.

Just before this tag enter the code shown below.

{{ shopwired.custom_form({
      'to_email': '',
      'from_email': '',
      'redirect_url': '',
      'subject': '' })
}}

You'll now have something like the example shown below.

You'll need to complete the values for each of the fields shown here.

to_email corresponds to the email that you want to receive submissions of the form to

from_email corresponds to the email that will send the email to the to_email email address

redirect_url corresponds to the URL that you want the user to be redirected to when they complete the form

subject corresponds to the subject of the email that will be sent to you containing the form submission

As shown in the example below.

Make sure that the redirect URL you specify does exist and test the form once you have made these changes to make sure you are receiving form submissions at the specified email address.