News:

Build a stunning handcrafted website with IT Acumens

Main Menu

HTML Forms

Started by VelMurugan, Apr 30, 2009, 08:42 PM

Previous topic - Next topic

VelMurugan

HTML Forms

Forms are used in HTML to pass data. On the web, data is typically passed as a key-value pair. For example, the following URL:

http://www.xyz.com/example?c=1&d=title

has two separate key-value pairs, separated by '&'. The key for the first key-value pair is 'c', and the value is '1'. The key for the second key-value pair is 'd', and its value is 'title'.

How are key-value pair specified? They are specified by the <form> tag. The general format is as follows:

<form action=xxx>
  ...
  [section specifying the value for each key]
  ...
  <input type=submit value=Go>
</form>

The text after action= specifies the script to be executed after the user submits the information. <input type=submit> gives a button that the user clicks when she is ready to submit the information. The value=Go piece specifies the text appearing on the button, in this case 'Go'. This is shown below:

The following list gives the most common ways for users to specify the value:

    * Text input
    * Radio button
    * Checkbox
    * Drop-down menu

Each will be described in more detail in its own section.

richardpeter

Well designed HTML forms can be extremely simple and allow companies to get all the necessary information in a short amount of time. The HTML format can allow users to present information in a clear, effective and able blueprint application altered colors and elements within the form.

mikerock

HTML for are great way for gathering data for client site. HTML forms have advantage as well as disadvantage.
The most commonly problem with HTML forms is their dependency on scripting languages. HTML forms are reliant on script to accomplish many common tasks such as marking controls as required, performing validations and calculations, displaying error messages, and managing dynamic layout. This dependency results in complex documents, which are expensive and time-consuming to maintain