HOME    articles    tutorials    tool directory    about

Free Email
META Tag Generator



Forms Part 1: Basic Forms Tutorial- page 2

In addition to a form needing to know how to send the information, it also needs to know where to send the information to be processed. The ACTION attribute will contain the URL to the form processing script or it may contain an email address.

Example Form:

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

Example Email Form:

<FORM ACTION="mailto:you@yourdomain.com">
Name: <INPUT name="Name" value="" size="10">
Email: <INPUT name="Email" value="" size="10">
<INPUT type="submit" value="Submit">
</FORM>
The email form will simply process the information that is placed within your form and send it to your email address. A CGI script is not required.

Notice when the ACTION attribute references an email address, you don't have to include the METHOD attribute.

Form Element Attributes

Method - Determines which http method will be used to send the form's information to the web server. Action - The URL of the form processing script that resides on the server. This script will process the form's information. Enctype - Determines the method used to encode the form's information. This attribute may be left blank (default) unless you're using a file upload field. Target - Specifies the target frame or window for the response page.

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="?">

Input Attributes 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.

previous page next page


HOME    articles    tutorials    tool directory    about

(c) copyright 2000-2010 Anventure.  All Rights Reserved.
privacy policy