The community is working on translating this tutorial into Spanish, but it seems that no one has started the translation process for this article yet. If you can help us, then please click "More info".
If you are fluent in Spanish, then please help us - just point to any untranslated element (highlighted with a yellow left border - remember that images should have their titles translated as well!) inside the article and click the translation button to get started. Or have a look at the current translation status for the Spanish language.
If you see a translation that you think looks wrong, then please consult the original article to make sure and then use the vote button to let us know about it.
Please help us by translating the following metadata for the article/chapter, if they are not already translated.
If you are not satisfied with the translation of a specific metadata item, you may vote it down - when it reaches a certain negative threshold, it will be removed. Please only submit an altered translation of a metadata item if you have good reasons to do so!
Introduction to Forms
A form is simply an area that contains form fields. A form field is an object which the user can add information to – whether it be a text area, a radio button or a dropdown menu. Any web form essentially works the same way – the user fills in some information and submits a button. The form is essential if you want to know anything about your user – e.g. have them send you a mail, store information about them in your database, and so forth.
There are countless ways to set up your form and if you’ve ever spent more than 30 minutes on the web (and I assume have) you have probably used them to sign up for newsletters, do a currency conversion, or anything in between.
In this chapter you will learn the very basics of creating web forms and once you have gotten this down, you can look into all the new features that HTML5 introduces to web forms in a future chapter.
How does an HTML form work?
A web form consists two parts - the HTML ‘front end’ and a back end form processor. The HTML front end part handles the presentation while the back end handles the form submissions.
The back end of the form is usually written in languages like PHP or ASP. But don’t worry you don’t have to know any of these languages to get a working form – you can use a formmail, which is usually accessible through your internet service provider (ISP). If not, there is several free and paid services out there and all you have to do is choose one of your liking.
Here is how a form normally works, step-by-step
- A user visits your web page which contains a form.
- The users’ web browser displays the HTML form.
- The user fills out the form and clicks submits
- The browser sends the submitted form data to the web server
- A form processor script (also known as a formmail) running on the web server processes the form data
- A response page is sent back to the browser.