This is an old revision of the document!
This form can be used by Lookafter customers to create contact or feedback form on their website, which will send all collected information to the target email address.
Important Notes:
The form action looks like below.
<FORM action="https://vo.agnx.com/cgi-bin/vo/formmail.cgi.vo" method="post">
Field Name | Description |
---|---|
_formFrom | Show in the FROM: section of the email |
_formSubject | Subject of email: The date & time stamp [datetime] will be replaced with the form submission date and time. [formRef] is a unique number genereted for the email, good for tracking use |
_formTo | Email for this form to send to. You can turn this to hidden field if you are sending this form to a permanent address. Separate each email with “,” |
_formOutputTemplate | The field/value format in email. By default, this is set to: [<field>]<br><value><br><br> You can change the format easily to: <field>: <value><br><br> if you would like to have the field name and value stay in one line. Note that only 3 keywords are supported: <field>, <value> and <br> |
_formOutputTemplate_header | The text to insert at the begining of the email |
_formOutputTemplate_footer | The text to insert at the end of the email |
_form_contenttype | The MIME email content type. “text” or “html” allow, default “text”. Good to set it to “html” if you have formated the form format to html |
_formNext | Where do you want to go after this form submitted. After a successful post, where do you want to bring the user to next? Specify the URL here (eg: http://www.mysite.com). Skip this if you wish to use the default. |
_formErr | What do you want to show if this form has some incomplete entry (eg: http://www.mysite.com/error.htm). Skip this if you wish to use internal error handling |
_formCleanFieldName | Use in pair with mandatory field name. Don't show the tilt “~” in mandatory field name if checked. Eg: ~name will become name in email |
_formVoidNum | Don't show the number prefix in field name if checked, eg: 1, name will be shown as name in email |
_formAllField | All field wanted; checked if you want the user to fill-up all the fields |
_form_custom_header | The additional MIME header to insert into the email. Usually not require. Format in Key: Data (eg: To: online@domain.tld) |
_formDateFormat | The custom date format. Available: YYYY (4 digits year), YY (2 digits year), MM (2 digits month), M (single digit month), DD and D. All date format in upper case. Time format as hh, h, mm, m, s, ss (lower case). Eg: YYYY/MM/DD hh:mm:ss returns 2010/03/30 13:22:00 |
Mandatory field | User must fill in this field - or error warning will be given after submit. All mandatory fields start with a tilt “~”. Set the _formCleanFieldName to checked if you would like the field name to be shown without the “~” in the email |
In order to load and display captcha, you are required to insert the following javascript function into your html header.
<script language="javascript"> $(document).ready(function(){ $('#hv').load('/cgi-bin/vo/form_hv.cgi.vo'); }); </script>
To display the captcha field, simply insert into your form.
Your Name: <input type="name" id="name" name="name" required> Your Email: <input type="email" id="email" name="email" required> <span id="hv"></span> <input type="submit" value="Send Message">
The following javascript function is used to check if captcha is filled when the form is submitted. If the captcha is not filled, the user will be alerted.
<script> function validateForm() { var x=document.forms["formName"]["_hv"].value; if (x==null || x=="") { alert("Please fill in captcha"); return false; } } </script>
Where formName represents the name of the form.
This function can be inserted as the onsubmit event of the form, like the example below.
<FORM action="http://vo.yourdomain.com/cgi-bin/vo/formmail.cgi.vo" method="post" id="formName" name="formName" onsubmit="return validateForm() />