Contact forms allow people viewing your website to contact you to enquire about items or services that you sell, to comment on your website, or to report an error they have found. Contact forms are often more useful than getting people to email you directly because you can make sure that they include all the information that you need.
Error checks can be performed on the information that a visitor enters into your form. This can be very useful, as users may make an obvious mistake, or simply forget to enter some important information. It also gives greater security for your website, as people cannot enter malicious code. Error checking can be as simple as checking that a field has not been left empty. Fields can also be checked to ensure that they are of the correct type - for example, names should only contain letters and phone numbers should only contain numbers and a few other characters. Email addresses and URLs can also be checked to ensure that they are in the correct format.
If an error is found, the original form is redisplayed, highlighting the area or areas where an error was found. This could be a short message or red lines around the relevant text box. All of the original data that was entered is redisplayed, making it simple for the user to correct their error and resubmit the form.
Once the form has been correctly filled in and submitted, an email will be sent to you containing all of the information, laid out exactly as you wish. This can be a plain text email or a HTML email. If you require, an email can also be sent to the person who filled in the form, confirming that they have filled in the form and giving them a copy of all the information that they have given you.
'Thank You' Page
Once the form has been successfully submitted, a thank you page is displayed to inform the user that their message was successfully sent. This message can be personalised with their name and other details which were entered into the form.