|Back to Tutorials||
||for your On-Line Order and Feedback Forms|
NECESSARY FORM FIELDS
There is only one form field that you absolutely MUST have in your form for FormMail to work correctly. This is the recipient field.
OPTIONAL FORM FIELDS
Description: This allows the user to specify their return email address which will then appear in the From: field of the email you receive. If you do not include this field, you won't be able to reply to the form sender. To ensure that the sender uses a valid email syntax, add this field name to the required field.
Syntax: <input type=text name="email">
Description: The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the From: line of your message header.
Syntax: <input type=text name="realname">
Description: The subject field allows you to specify the subject title that appears in the email that is sent to you after this form has been filled out. If you choose not to use this option, then the script will default to a message subject: WWW Form Submission.
Syntax: <input type=hidden name="subject" value="Order Form ">
NB: You can change "Order Form" to whatever you'd like it to read, eg. Booking Form, Online Order Submission etc.
Description: This forces certain fields in your form to be filled in before the user can successfully submit the form. Simply place all field names that you want to be mandatory into this field. If the required fields are not filled in on the form, the user will be notified of what they need to fill in, and a link back to the form they just submitted will be provided.
Syntax: <input type=hidden name="required" value="email,realname,phone">
*This value is forcing the email, realname & phone fields to be completed otherwise the form cannot be submitted.
Description: This form field allows you to specify the title and header that will appear on the resulting page which the user will see after the form has been submitted.
Syntax:<input type=hidden name="title" value="Feedback Form Results">
Use the above if you wanted a title of "Feedback Form Results" , or for a more personalised title, how about:
<input type=hidden name="title" value="Thank you. Your request has been submitted and we will be in touch shortly.">
Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made Thank-you page.
Syntax: <input type=hidden name="redirect" value="http://your.domainname.com/thankyou.htm">
NB: This will override the "title" field above as the user will no longer see the default page after the form has been submitted.