home > support > enquiry forms
Launch “Enquiry Form Builder” (beta)
Enquiry forms can be used for general "Contact us", "Brochure request", "Newsletter signup" or other non product/date specific requests. Any type of request that you want to collect on your website and funnel into your workflow (assign to a staff member, set a followup date etc).
If instead you are looking to collect product and date specific requests you may want to consider using the Booking Engine, remember you can fully customise all the wording so that the customer knows they are just making an enquiry / quote request.
Just build a normal web form pointing at the TourCMS servers (action="https://live.tourcms.com/enquiry.php"), make sure you have entered your Account ID, Enquiry Key and Return URL and check the names of your fields match up with those listed below. Simple.
If you would like the client to receive an automated response, don't forget to configure the "Enquiry thank you" template in channel manager and also add the Channel ID field to your form so TourCMS knows which channel to take email template from.
If you have an existing form you want to use then just make sure you have added the important fields and renamed any of your other fields to match the table below and you should be good to go.
All enquiry data is sent securely and encrypted via SSL.
<form method="post" action="https://live.tourcms.com/enquiry.php">
<!-- Account settings -->
<input name="tourcms_account_id" value="ACCOUNT_ID_GOES_HERE" type="hidden" />
<input name="tourcms_channel_id" value="CHANNEL_ID_GOES_HERE" type="hidden" />
<input name="tourcms_enquiry_key" value="ENQUIRY_KEY_GOES_HERE" type="hidden" />
<input name="tourcms_return_url" value="RETURN_URL_GOES_HERE" type="hidden" />
<input name="tourcms_problem_url" value="PROBLEM_URL_GOES_HERE" type="hidden" />
<!-- Your fields -->
<input name="enquiry_type" value="General%20Enquiry" type="hidden" />
<label>Title
<select name="title">
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Sir">Sir</option>
</select>
</label>
<label>Firstname
<input type="text" name="firstname" required="required" />
</label>
<label>Surname
<input type="text" name="surname" required="required" />
</label>
<label>Details
<textarea name="enquiry_detail"></textarea>
</label>
<input type="submit" value="submit" />
</form>
These tell TourCMS which account the enquiry should go to, to get yours just log into TourCMS then head to Configuration & setup > Enquiries. If you haven't set an Enquiry key before then you will need to set one before you can continue.
This should be the full URL (link) that you want your customers to be taken to once their enquiry has been stored by TourCMS, it could contain a thankyou message perhaps.
You must ensure that you have at least one of enquiry_type, enquiry_category, enquiry_value, enquiry_outcome or enquiry_note on your form otherwise TourCMS will just create a new customer record and not an enquiry. The example above (and any form generated using our Enquiry form builder solve this by having enquiry_type set as a hidden field - this is also a good way to differentiate if you have multiple forms on your site.
If you have configured Extra customer data fields on your account to store additional information about the customer themselves (rather than their particular enquiry) those can also be added to the form. Just name the form field(s) custom_X where X is the tag entered when the field was created. So for example a field with the tag "waist" should be added to the form as a field named "custom_waist".
Don't forget to validate the data you submit, numeric fields should be validated as numbers, any date fields should be in the format YYYY-MM-DD. If invalid dates are provided, or non number values passed to the numeric field, TourCMS will place the data in the main enquiry form details so that it is not lost.
Any field that you add to your form which TourCMS doesn't recognise will just be added to the end of the Enquiry "Details" box, so you can be creative with your form design and add any fields you wish.
One common solution to unwanted spam / junk form submissions is to add what is known as a CAPTCHA, usually a picture of some distorted letters and numbers that the user needs to decipher and type into a box before they can submit the form.
CAPTCHAs are generally effective but are not particularly user friendly. Instead TourCMS supports the use of a honeypot field, this is a field that is hidden from users via CSS so that only automated bots will enter anything into the box, thus any form submissions with text in the honeypot field can be ignored.
The basic steps are:
Here's some sample code, this can be copy and pasted in to your form anywhere between the <form> and </form> tags:
<div class="tourcmshpot">
<label for="hp">Leave this field entirely blank</label>
<input type="text" name="hp" id="hp" autocomplete="off" tabindex="-1" />
</div>
<style type="text/css">
.tourcmshpot label, .tourcmshpot input {
display: none;
}
</style>
When you view your form you should not see the text "Leave this field entirely blank" or the box itself.
It's unlikely that a legitimate user will fill in the honeypot field, however just in case it's a good idea to specify an alternative return url for them to be redirected to. Try to avoid using the phrase error or problem in the URL, but do make sure the page content explains that the user's request was not submitted, perhaps offer alternative contacts.
<input type="hidden" name="tourcms_problem_url" value="PROBLEM_URL_GOES_HERE" />
If you have an existing form that is already receiving spam you should change the enquiry key at the same time as adding the honeypot field. Don't forget you will also need to put the new key on any other enquiry forms you may have added.
The full list of special fields are below, don't forget that any fields you add which TourCMS doesn't recognise will just get added to the enquiry "Details" in TourCMS - so you can collect all sorts of different information beyond what is listed below.
You might want to try using our Enquiry form builder to help you get the basics of your form set up.
Field | Notes |
---|---|
Mandatory fields (You must include these!) | |
tourcms_account_id | Your account ID, find this in "Configuration & Setup" > "Enquiries" |
tourcms_enquiry_key | Your enquiry key, set/find this in "Configuration & Setup" > "Enquiries" |
tourcms_return_url | A link to a page on your website that the client should be taken to once their request has been submitted |
Commonly used fields | |
tourcms_channel_id | Associate the enquiry with a specific channel within your account, include this if you would like TourCMS to send the "Enquiry thank you" email template stored on that channel |
tourcms_problem_url | A link to a page on your website that the client should be taken to if there is a problem submitting their enquiry |
title | Customer title e.g. Mr, Mrs etc |
firstname | First name |
surname | Surname |
Email address | |
tel_home | Tel home / evening (other phone number fields are listed in the "Not so commonly used fields" section below, however if only taking one phone number then you might want to use this field) |
address | Address (can be multi-line) |
city | City |
county | County / State |
postcode | Postcode / Zipcode |
country | 2 digit country code (uppercase). Here's a HTML snippet containing all countries in a select box |
perm_email | Set to 1 if the customer is opting in to email marketing, 0 for no marketing or leave blank / don't include to stick with your account defaults |
enquiry_type | "Brochure", "Tailor-made tour" request, "Contact us" form etc. |
enquiry_detail | The main note for the enquiry (can be multi-line) |
Less commonly used fields | |
enquiry_category | Sub-category for type (e.g. if for a brochure, the brochure name) |
enquiry_assignto | TourCMS staff user enquiry should be assigned to (Username) |
enquiry_value | Value (e.g. financial value) (Doesn't have to be numeric) |
enquiry_outcome | Text description of the outcome of the enquiry |
enquiry_followup_date | Followup date (YYYY-MM-DD) |
enquiry_note | n/a |
middlename | Middle name (or initial) |
nationality | 2 digit country code (uppercase). Here's a HTML snippet containing all countries in a select box |
gender | The customers gender. Leave blank / don't supply if gender is unknown, otherwise supply one of the following digits: m = Male f = Female x = Indeterminate |
dob | Date of Birth (YYYY-MM-DD) |
agecat | Age category - 1 digit code (i-Infant, c-Child, a-Adult, s-Senior). Alternatively if you know the customers DOB then pass that instead and TourCMS will calculate the agecat automatically. |
pass_num | Passport number |
pass_issue | Passport place of issue |
pass_issue_date | Passport issue date (YYYY-MM-DD) |
pass_expiry_date | Passport expiry date (YYYY-MM-DD) |
wherehear | Where did the customer hear about us (doesn't have to be pre-configured) |
fax | Fax number |
tel_work | Tel work / day |
tel_mobile | Tel mobile |
tel_sms | Tel sms |
contact_note | Contact note (e.g. don't call before 8pm) |
dear | "Dear text", used to provide an alternative greeting from the account default. For example if the default was the text "Dear " followed by the customers firstname that might be Dear Joe, however you may prefer to contact them by a nickname and be less formal, so pass the string "Hi JJ". |
envelope | Similar to the dear field above but designed to be used on envelopes. |
notes | General notes on the customer |
diet | Dietary requirements |
medical | Medical conditions |
nok_name | Emergency contact name |
nok_relationship | Emergency contact relationship |
nok_tel | Emergency contact telephone number |
nok_contact | Emergency contact other note (can be multi-line) |