Home Login Registration Authors Contact Us About Us Subscribe
Want to receive new articles via e-mail? Click here!
: Home  :: Web Design  :: Design Tuturial
Forms - Part I - Basic Forms Tutorial
by Webdevinfo - Webmaster
Views: 724
Votes: 1
Rating: 0.00
Rate this article  Print this article  Email this article  View this article in PDF  Discuss this article
First< Prev | Page:  1 | 2 | 
The Article

Form Element Properties:

Form Element Properties:

- Text boxes
- Hidden
- Password
- Checkbox
- Radio button
- Submit
- Image submit
- Reset

These properties are specified by using the TYPE attribute within the form's INPUT element.

* INPUT

<INPUT TYPE="?">

The INPUT element has the following properties that may be used:

TYPE - Type of input field
NAME - Variable name sent to the form processing script.
VALUE - Information associated with the variable name to be sent to the form processing script.
MAXLENGTH - Maximum number of characters that may be placed within an input area.
SIZE - The size of the input text area.
CHECKED - Default button or box selection.


* TEXT BOXES

<INPUT TYPE="text">

Enables users to input text such as an email address.

<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
<INPUT type="TEXT" size="10" maxlength="30">
<INPUT type="Submit" VALUE="Submit">
</FORM>

Text Box Attributes

TYPE - Text
SIZE - The size of the text box specified in characters.
NAME - Name of the variable to be processed by the form processing script.
VALUE - Will display a default value within the text box.
MAXLENGTH - Maximum number of characters that may be placed within the text box.


* HIDDEN

<INPUT TYPE="hidden">

Used to send information to the form processing script that you don't want your visitors to see. Nothing will show through the browser.

<INPUT type="hidden" name="redirect"
value="http://www.yourdomain.com/">

Hidden Attributes

TYPE - Hidden
NAME - Name of the variable to be processed by the form processing script.
VALUE - The value of the hidden name expected by the form processing script.


* PASSWORD

<INPUT TYPE="password">

Used to enable users to enter a password. When a password is typed in, asterisks will appear instead of text.

<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
<INPUT type="password" size="10" maxlength="30">
<INPUT type="Submit" VALUE="Submit">
</FORM>

Password Attributes

TYPE - Password
NAME - Name of the variable to be processed by the form processing script.
VALUE - Usually blank.
SIZE - The size of the text box specified in characters.
MAXLENGTH - Maximum number of characters that may be placed within the text box.


* CHECKBOX

<INPUT TYPE="checkbox">

Enables the user to select multiple options.

<FORM METHOD=post ACTION="/cgi-bin/example.cgi">
<INPUT type="CHECKBOX" name="selection1"> Selection 1
<INPUT type="CHECKBOX" name="selection2"> Selection 2
<INPUT type="CHECKBOX" name="selection3"> Selection 3
<INPUT type="Submit" value="Submit">
</FORM>

Check Box Attributes

TYPE - Checkbox
CHECKED - Specifies a default selection.
NAME - Name of the variable to be processed by the form processing script.
VALUE - The value of the selected check box.

About The Author
Shelley Lowery is the author of the highly acclaimed ebook series, Web Design Mastery -- an in-depth guide to professional web design that is rapidly becoming known as the "Bible" for professional web design.
http://www.webdesignmastery.com

First< Prev | Page:  1 | 2 | 
Rate this article  Print this article  Email this article  View this article in PDF  Discuss this article
Similar/related articles:
Advanced Search
Site Search:


FirstWebHosting
Top Ten Hosts as picked by our editors - with reviews and interviews.
The Host Planet
Web hosting reviews and ratings. Learn how to spot a great host.
Hosts2002
The first and greatest hosting directory with the consumer in mind.
Hostcue.com
Hosting directory for the masses with special offers Check us out!
WebDevForums
Web developers or all levels discuss the details of design and ecommerce.
Needscripts.com
Free scripts and applications for web developers.