Friday, October 15, 2010

HTML Forms

An HTML Form is a special kind of form created to pass data to a server. This form may contain text fields, markups, controls like checkboxes, radio-buttons, submit buttons and menus. A form also has labels and legends on these controls. The HTML tags are NOT case sensitive. It is important to note that HTML Forms are faster and distinctly more configure-able than fillable PDF forms. FPDF forms are definitely better for information transfer and are more printer friendly. HTML Forms, however, are most suitable for forms that need to be filled online and submitted to some agent for processing.

An user is required to fill a form by entering specific modifications to the controls and selecting relevant items from the drop down menus. Once he is done with the changes, he simply clicks on the push button “SUBMIT” and which signals the browser to send the data to the server for further processing.

Controls in HTML Forms

Buttons - The HTML page author can create three types of buttons –

1. Submit buttons: When activated, a submit button submits a form. A form may contain more than one submit button.
2. Reset buttons: When activated, a reset button resets all controls to their initial values.
3. Push buttons: Push buttons have no default behavior. They have client-side scripts associated with the element's event attributes. When an event occurs (e.g., the user presses the button, releases it, etc.), the associated script is triggered.

The BUTTON element always has more prominent rendering capabilities than the INPUT element.

Checkboxes - Checkboxes are on/off switches toggled by the form user. When the control element’s checked attribute is set, the switch is ‘on’. The INPUT element is needed to create a checkbox control.

Radio buttons - Radio buttons are similar to checkboxes except that when several share the same control name, they are mutually exclusive: when one is switched "on", all others with the same name are switched "off". The INPUT element is used to create a radio button control.

Menus – Drop down menus offer the users with options to choose from. The SELECT element creates a menu, in combination with the OPTGROUP and OPTION elements.

text input.

Input element and Text Area - Users can input text through two types of elements. The INPUT element creates a single-line input control and the TEXTAREA element creates a multi-line input control. In both cases, the input text becomes the control's current value.

File select – This type of control is used to select and attach files before submitting a particular form. The INPUT element is used to create a file select control.

Hidden controls – The hidden control is used to store exchanges between client and the server that may otherwise get lost due to the stateless nature of the server.

Advantages of HTML Forms -

* An HTML FORM and INPUT tags add interactivity to the web site.

* The HTML Form takes orders, surveys, and user registration and so on.

Today is it impossible to find a website without HTML and Input tags. They sustain the liveliness of any website by collecting data from users through registration and other such relevant forms.

No comments:

Post a Comment