Understanding HTML Web Forms
Forms are a very powerful way of gathering information and interacting with your web site's visitors. Almost every site has an email contact form, and many sites have newsletter forms, survey forms etc. A web form consists of two main components:
In addition a form has form logic. Because a script is used to process the form the script can be used to make decisions based on the form content. Although complex form handling mechanisms are possible the most commonly used are:
Form ProcessTo successfully use forms you should be aware of the form process which is generally as follows:
Additionally it has become common to use a form Captcha is used to combat spam. If it is used it is checked by the script on the web server and if invalid the form is represented. Location of Components.The form and form handler can be located in several locations. Either on your website, a remote website or a combination of the two. The diagram below show the 3 possible scenarios.
The Form handlerThis is some form of script (PHP,ASP) or program (CGI) whose job is to validate and extract the user data from the form and either email it to you or store the data in a database for later use. The host must however provide support for scripts (many do) if you are going to implement them yourself. For those whose hosts either do not support scripts, or the scripts are inadequate then you can also use remote hosted form handlers. Web Form DataThe data entered into the form is extracted from the form by the form handler and is either emailed to you or placed into a database on the web server. Web Forms - Building OptionsThere are five ways you can create a web form
Use a Web Page Editor Plus Manual CodingThis requires that you have a knowledge of both HTML and PHP/ASP scripting and is suitable for more experienced website owners and for simple forms. You can usually get pre-made forms and make minor changes if necessary. I provide a basic PHP email contact form that you are free to use and modify. Use a Special Form ProgramI have used the
Coffee Cup Form
My only negative with he software is that it doesn't support payment within the forms. This however is not required in most cases. As an example it would allow you to create a room reservation form but not to pay for it. You would have to have another mechanism to handle payment. Web Based ServiceOriginally web based service were used primarily because the host didn't provide script support and so the form was processed by a form handler on a third party server. Now most hosts allow scripts and free scripts are available for basic contact forms and so third party service now concentrate more on being able to offer professional complex forms and drag and drop form design capabilities. Most offer a free service which is usually only good for testing purposes as it either has advertising or is very limited. After that they charge a monthly rate which I find in most cases to be expensive. Use a Form DesignerIf you find it all too much or just don't have the time then this is usually the best option. Many web designer will do this for you and some of the web based service providers offer form design services. Even though today it is usually unnecessary to create your own forms using HTML it is still useful to be familiar with the form structure and form elements in case you need to tweak a form or manually edit one. Therefore we will look at Creating HTML Web Forms.
Related articles and Resources:
|
|||