Website Design and Programming - Introduction to Web Forms

There is practically no website without at least a· Checkboxes
form in one of its pages. Forms are useful to collect· Buttons
data from the website visitors and users. Once the· HiddenThe hidden fields are used to send
user submits the form to the server, a formsome data that the user does not need to see, along
processing script must get the form data, validatewith the form. An example of this could be a form
that the user input matches the expected format fornumber, so the form processing script identifies which
each field (e.g: email address field must be a string ofform has been submitted.The File field allows users to
text with the format of a valid email address) andupload a file. The form processing script will get the
process this information as desired. The script mayfile together with the rest of the form data. For this
save it into a database, send it by email or just dofield to work properly, you need to include this
some processing with it and display the result.attribute in the tag: enctype="multipart
Validating the user input is essential to preventform-data".Buttons are used to submit or reset the
malicious users from damaging your site.A formform.Refer to an HTML guide for full description on
definition in html starts with the form tag and endsthe attributes and syntax of each tag. You may find
with the /form tag. This tag can have severala guide at or at among many other sites.When the
attributes like method (GET or POST), and actionform is complex, it is useful to group fields in areas
(the url of the form processing script). If use theusing the fieldset tag. Just place the fieldset tag, then
GET method, the form data is encoded in the actionoptionally a legend Section Name /legend tag, then all
URL. This method is recommended when the form isthe pertinent form fields, and the /fieldset tag after
a query form. With the POST method, the form datathem.It is possible to use CSS (Cascading Style
is to appear within a message body. This is theSheets) or inline styles to change the look of the
recommended method when the form will be usedform controls.You can bring your forms to a different
to update a database, or send email, or make anylevel by combining them with the usage of scripting
action other than just retrieve data.The form fieldslanguage like JavaScript. You can make the form
are used to collect the data. Generally a label isreact immediately to certain events, like the user
placed by each field, so the user knows what dataclicking on a control, or a field changing its value. You
to input. There are different kind of fields, amongcan highlight the field that has the focus, for example.
them:· TextboxesOr count how many characters have been entered in
· Textareasa text box or a textarea. You can make calculations
· Drop-downsand display the results automatically. The possibilities
· Multi selectare endless.Sergio Roth is an experienced freelance
· Fileweb programmer.
· Radio buttons