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