Do you have any tips to ensure my cgiemail form is successful? Print
Submit Cancel
Email this article

Close

You are here: Home > Website Support > CGI Scripts

Herewith some general advise when checking your cgiemail form:

Tips for the Template.txt

  • Use a single word inside square brackets with no spaces, e.g. Contact Person: [contactname]
  • Give your input fields sensible names, like ‘email’ or ‘contactname’
  • Ensure that all words inside square brackets are in lowercase
  • Ensure that there are no blank lines among the header lines
  • Ensure that there are no blank lines before the header lines
  • Ensure that all your header lines are valid for the template file
  • Ensure that there is a blank line between the header lines and the body
  • Save the file as ASCII text - Using Microsoft Word, use ‘Save As’ and choose ‘Text Only with Line Breaks’
  • Save file as template.txt
  • Do not remove headers fields i.e. To:, Cc.

 

Tips for the HTML form (form.html)

HTML feedback forms for site visitors must include a ‘submit’ and ‘reset’ button. Amend each of the form field descriptions to correspond with those specified in your own template file, as created above. Enter the corresponding ‘name’ values from your template file for each field in the square [ ] brackets into your HTML code. Leave the square [ ] brackets in the template.txt email template (otherwise the references within will not get replaced with their values).

Note that the ‘name’ field of each input field must correspond to what you previously put in the email template. For example, if you put name ‘companyname’ in your HTML form code, you will have to use [companyname] in your email template file as well. All fields are case-sensitive, e.g. CompanyName is not the same as companyname.


Tips for the Success page - (confirm.htm)

‘Transaction Successful! - A confirmation message will be sent within only a few minutes to the contact email address provided.’
Amend the document as required. When you have completed the modifications, save the file as confirm.htm. You might want to use a confirmation page you already designed rather than confirm.htm (i.e. replace the reference to ‘confirm.htm’ in the cgiemail code with the name of your file instead).


Tips for Uploading files:

If you do not make use of the File Manager to load and extract the files, once modifications have been completed, upload the three files in ASCII mode to your ‘public_html’ directory:

template.txt
confirm.htm
form.html


Note: The template.txt file MUST be uploaded in ASCII mode.

You may wish to use alternative file names for either the template.txt or confirm.htm documents. If this is the case, please ensure that the corresponding references in cgiemail code refer to your preferred file names instead.

If you would like to place these files in a different folder, be sure to change the path in the above cgiemail code accordingly. For example, if you want to put them in a subdirectory called FOLDER, amend the html code of the feedback form as follows:

<input value="http://www.yourdomain.com/FOLDER/confirm.htm" name="success" type="hidden"

Was this information helpful?

Yes No

Thank you for your feedback
We are delighted to find that our article resolved your query.

Thank you for your feedback
We will resolve your query as soon as possible.

Please take a few moments to comment on your unresolved query. Simply tell us what your problem is. We guarantee that we'll get back to you within two hours (during office hours) in response to your query.


  Partially resolved    Unresolved
Enter your query here:
Your name:
Your email address:
Contact number:
Customer number or domain name:
 
Preferred contact method: Email     Call me
Please enter the text in the picture below into the text box:
CAPTCHA Image:
ID Number:
 
  • Hosting for Beginners

    Step-by-step guide to hosting with Hetzner.

    VIEW NOW
  • Application Tutorials

    Use our installation guides to get up and running.

    VIEW NOW
  • Login Now

    Our award winning proprietary control panel empowers customers to manage their hosting environment.

    Take the Tour
  • Contact Us

    support@hetzner.co.za

    Phone: 0861-0861-08
    Fax: 0861 0861-09
    Contact Us