AShop Customer Inquiry Form Setup Instructions

mailform.php uses the template contactus.html which must contain the email, firstname, lastname, subject and message fields but can also contain any number of other fields that will be added to the beginning of message like this...

<input type="text" name="extrafieldname" value="<!-- Mailform_extrafieldname -->" size="20">
 
The "<!-- Mailform_extrafieldname -->" code can be used to preserve the values if the form is submitted without the necessary fields: email and message, which will cause the script to display the form again. You should simply replace what's between the "<!-- Mailform_" and  " -->" with the field name: <!-- Mailform_lastname --> or <!-- Mailform_address -->.
 
All extra fields that are submitted will be added to the message text.

It will check that the confirmed email matches the email field if a field named confirmemail exists or skip this step if it doesn't.

It will display a graphical security code that needs to be entered to submit the form. If the code is incorrect an error message will be displayed.

The template contains a few variables that look like this: <!-- AShopvariable --> They have the following purposes:

<!-- AShoperrormessage --> will be replaced with error or confirmation messages if there are any.
<!-- AShopsecurityimage --> will be replaced with an image tag that displays the security code
<!-- AShopsecuritycode --> will be replaced with the random code that is used to generate and validate the security code

All other variables will be replaced with their corresponding value: <!-- Mailform_subject --> = the value of the field "subject" if sent to the script. This can be used to keep the values of the form fields in case there 
is an error.

The messages that are submitted through the form are stored directly in the Sales Office inbox and are immediately available on the inquiries page.

It will work from any subdirectory of the AShop installation directory. You just need to copy the script and the file contactus.html to the subdirectory to make it work. It will also display a validation message when the form is submitted without the necessary fields and use a standard subject ("Mailform message") when the subject field is missing.
