Contact Forms

Top  Previous  Next

AShop contact forms post directly to the Sales Office inbox (database) and do not send any email.  An image recognition character entry requirement in the form prevents most automated spam submissions. When used with an https connection, the AShop contact forms provide a secure way to receive sensitive information from a web site submission.

 

clip10136

 

The contact form requires three files, which are distributed in the emerchant directory.

mailform.php (This is the program script. It is not editable.)
mailform.tpl (This file, which is in HTML format, defines the page layout and form fields. Edit this file.)
thankyou.html (This file defines the confirmation page, after mailform.php is submitted. Edit this file.)

 

The contact form files will work in the emerchant directory or within any other subdirectory of your AShop installation. An unlimited number of custom contact forms may be created by copying these three files, modifying the html files as needed and uploading the files to separate subdirectories.

 

To set up a contact form, edit the mailform.tpl and thankyou.html files in an HTML editor. Copy and edit the example mailform.tpl, which is provided in the emerchant directory. Add or delete fields as needed, but do NOT delete any of the following required fields or the %errormessage% and %securityimage% tokens. The fields may be hidden, but a value must be set for each of the following form fields.

 

firstname
lastname
email
confirmemail
subject
message
securitycheck

 

Tokens are used to set the value of each text field in the form. A token is the name of the field bracketed with percentage characters. For example, the text field with name="firstname" also has the parameter value="%firstname%". Each text field should have a value such as this, which corresponds with the field name. The tokens are used by mailform.php to repopulate the fields if there is a validation error and the page must be reloaded.

 

clip0210123

 

The thankyou.html file is simply an HTML file. There is nothing special about it except for the name and location.