About Forms in HTML...
= Index DOT Html by Brian Wilson =

Justification | Form Field Types | CGI-Bin
Related Sites
Main Index | Element Tree | Element Index | HTML Support History
Justification for HTML Forms
Forms are the primary method (and also the oldest) for making a web document interactive. Forms allow the input of information by a web page user. Various input methods exist to enter this information from the user such as buttons, pull-down menus and text boxes. When a user is finished entering information in an HTML form, they can "submit" this information. Submitting form information can result in the creation of dynamic web pages, the sending of e-mail, or other actions - it is all determined by the the intent of the program that is activated to analyze the form information.
Form Field Types
There are many different types of form input mechanisms. These field types represent many of the common input methods that can also be found in paper-based forms.

Form Delimiter
[<form>]
Forms in an HTML document are created by using the FORM container delimiter tags. These tags serve to encapsulate the fields of the form and contain information on how and where to process the form contents. These delimiters create a form of virtual Block Formatting in a document structure (a line break is usually added both before and after FORM delimiters.) This formatting does not add any semantic meaning to the structure (like most Block Formatting does) but is rather a side-effect of its nature (like with the TABLE structure.) Because this delimiter is a simple HTML element, it also allows multiple forms to exist in a document, each of which can serve different purposes.

Form Fields
[<button>, <selection list>, <textarea>, <input type=button>, <input type=checkbox>, <input type=file>, <input type=hidden>, <input type=image>, <input type=password>, <input type=radio>, <input type=reset>, <input type=submit>, <input type=text>]
It is up to the author to determine which of the various field types best suits their needs in terms of appropriateness to the task, ease of usability for the reader, and suitability for processing by the destination program.
CGI Binaries
When a form is submitted for evaluation, the information that has been entered is encoded and sent to a program invoked by the submission process. This program evaluates and processes the information entered in the form, and takes actions based on the input. This information transfer method is called the "Common Gateway Interface" (CGI) - a standard for external programs to interface with HTTP servers.

The program used to analyze the form data is called a "Common Gateway Interface Binary" (CGI-Bin for short.) A CGI-bin program can be written in any language that is allowed to be executed on a server system, such as C/C++, Fortran, Perl, Python, shell scripts, TCL, AppleScript, etc. Many types of information can be entered via an HTML forms interface, but it is always up to this CGI-Bin program to make sense out of what is received from the form and react accordingly.

While it is within the scope of these documents to discuss the HTML side of forms creation, any explanation of how to write a CGI-Bin program would definitely be a separate matter. Please look to the Related Sites section below for sites that cover this topic.

Related Sites
Official References
http://www.rfc-editor.org/rfc/rfc1866.txt
RFC 1866: The HTML 2.0 specification (plain text)
http://www.w3.org/MarkUp/html-spec
The web version of the HTML 2.0 (RFC 1866) specification
http://www.w3.org/MarkUp/Wilbur/
The HTML 3.2 (Wilbur) recommendation
[Includes all HTML 2 form elements in common use]
http://www.w3.org/TR/REC-html40/
The HTML 4.0 Recommendation
[Includes all 2.0, and 3.2 elements plus several additional features for forms]
http://home.netscape.com/assist/net_sites/html_extensions_3.html
Netscape Extensions to HTML 3.0
[mentions the use of File Upload (INPUT TYPE=file)]
http://msdn.microsoft.com/workshop/author/html/reference/elements.asp
Internet Explorer Tag reference
[Details form field usage supported in 2.0 and 3.2]


Tutorials
http://archive.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html
Mosaic for X version 2.0 Fill-Out Form Support
http://hoohoo.ncsa.uiuc.edu/cgi/forms.html
NCSA's "Decoding FORMs with CGI" tutorial
http://www.webcom.com/~webcom/html/tutor/forms/
WWW Fill-out Forms Tutorial
http://www.utoronto.ca/webdocs/HTMLdocs/NewHTML/forms.html
The Information Commons Introduction to HTML: Forms

Other Related Links
http://dir.yahoo.com/...../Forms/
Yahoo's HTML Forms section

Boring Copyright Stuff...