Menu Close

Get Support From ShopWired Close

All Systems Are Operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available 9.00am to 7.00pm Monday to Friday
11.00am to 5.00pm Saturday
Quickest response time

Send A Message
Response within 24 hours

Menu Close

Menu

Custom contact form

If you'd like visitors to your website to be able to complete a contact form, the results of which are then sent to you by email, you'll need to create a custom contact form.

1. The form action should be the URL of the page that you are creating the form to display on, e.g.

<form action="/some-url-here">

The method attribute should be post, e.g.

method="post"

You can include enctype="multipart/form-data" if the form includes a field for your users to upload a file.

For example,

<form action="/some-url-here" method="post" enctype="multipart/form-data">

2. Fields in the form can be constructed in normal HTML, e.g.

<input name="email_address" type="text">

3. If including a file attachment within the form this must have a name of "attachment", e.g.

<input name="attachment" type="file">

4. You must also include the following code within the <form> tag

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

to_email is the email address you want to receive the email at

from_email is the email address that the email should be sent from

subect is the subject line of the email that is generated once the form is completed

redirect_url is the URL that your visitor should be redirected to once they complete the form

success_message can be set instead of a redirect_url in order to keep the user on their current page

for example

{{ shopwired.custom_form({ 
    'to_email': 'info@joesshoeshop.com', 
    'from_email': 'info@joesshoeshop.com', 
    'redirect_url': '/thanks', 
    'subject': 'new website enquiry' 
}) }}