====== Lookafter Form-To-Mail Template with Captcha Support ======
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:**\\
* This form is designed to Lookafter customers only.
* This form must submit to a valid email address that is hosted with Lookafter.
* jquery.js must be included in the html in order to support the captcha display.
-----------
===== Form Action =====
The form action looks like below.
**Note:**\\
The form action URL link can be different for different domains. Please consult [[mailto:helpdesk@lookafter.com|Lookafter Helpdesk]] to confirm the URL that you should use.
-----------
===== Fields =====
^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:\\ //[]
//\\ You can change the format easily to:\\ //:
//\\ if you would like to have the field name and value stay in one line.\\ Note that only 3 keywords are supported: , and |
|_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|
|Captcha|Simple arithmetic captcha. Refer to the [[#captcha_support|sample below]].|
|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|
-----------
===== Captcha Support =====
In order to load and display captcha, you are required to insert the following javascript function into your html header.
To display the captcha field, simply insert //// into your form.
Your Name:
Your Email:
-----------
===== Captcha Validation (Optional) =====
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.
Where //formName// represents the name of the form.
This function can be inserted as the onsubmit event of the form, like the example below.