QUERY_STRING
.
METHOD=POST (the preferred) sends the input information in a data body
which is available on stdin
with the data length set
in the environment variable CONTENT_LENGTH
.
Form data is a stream of name=value
pairs
separated by the &
character.
Each name=value pair is URL encoded,
i.e. spaces are changed into the plus character and some characters
are encoded into hexadecimal.
At least one of the following is expected inside the FORM
contents: INPUT, SELECT, TEXTAREA.
<FORM></FORM>
- Elements Allowed Within...
- members of group
body.content
and elements
but not element
- Allowed In Content Of...
- Any element that permits members of group
block.forms
- Variations
- The original definition of FORM only defined the default value of
application/x-www-form-urlencoded
for the ENCTYPE attribute.
RFC 1867 adds the value of multipart/form-data
for this attribute to permit a FORM to upload one or more files
in addition to the FORM data. METHOD=POST is required with
this value of ENCTYPE.
This file upload extension is implemented in Netscape 2.0.
Most current browsers only handle ACTION for the
http:
access type, but proposals for handling the
mailto:
access type are being discussed.
The LANG, DIR, and ACCEPT-CHARSET attributes are introduced with the
internationalization proposal.
The ACCEPT-CHARSET attribute is to provide a hint as to the
character set or sets that the receiving URL is prepared to handle.
Version 3 proposes the SCRIPT attribute to specify a URL which
contains a limited syntax script to be downloaded to the browser
for execution to preprocess the FORM output before sending it
to the ACTION destination.
This SCRIPT proposal may change as part of the new proposals
concerning APPLET and EMBED.
All elements concerning FORM are Level 2.
TYPE=text
is default.
NAME
defines the symbolic name of the field
returned to the server on submission and must be present
for all but TYPE=submit|reset
.
For TYPE=checkbox|radio
, multiple INPUT elements may have the same NAME value.
TYPE=radio
insures that exactly one choice amongst
INPUT elements with the same NAME value is selected at all times.
VALUE
is used to specify a default.
For TYPE=text|password
VALUE defines default text to be returned,
which normally is null.
For TYPE=password
the value should be obscured as it is entered.
For TYPE=checkbox|radio
VALUE defines the value returned when the
checkbox or radio is selected, which defaults to "on"
For TYPE=submit|reset
VALUE defines the label for the pushbutton.
Multiple TYPE=submit
should have different NAME values to
identify which submission button was selected.
CHECKED
defaults the specific checkbox or radio INPUT to selected.
For TYPE=radio
the default element checked is the first among
those with the same NAME value.
TYPE=image
defines
an image, whose URLis identified by the SRC attribute,
which, when clicked, performs the form submission and sends
the X,Y coordinates of the click, similar to ISMAP in the IMG element.
SIZE
and MAXLENGTH
are only
used with TYPE=text|password
.
SIZE
is the physical size of the
displayed input field expressed in characters
or characters,rows.
MAXLENGTH
is the maximum number of characters that are
accepted as input.
text|password|checkbox|radio|submit|reset|hidden|image
The element
should be used instead of this INPUT element for multiline input areas.
TYPE=hidden VALUE="..."
is recognized by some browsers, and is
used to submit fixed information not entered by the user.
Note that RFC 1866 sets a max limit of 1024 characters on VALUE.
RFC 1866 only defines ALIGN=top|middle|bottom
RFC 1867 defines a mechanism for FORM-based file upload.
It defines the value file
for the TYPE attribute
and defines a new ACCEPT attribute.
Specifying TYPE=file
permits attaching one or more local files to the submitted output.
The browser may permit the user to specify multiple file names in
response to a single INPUT element with TYPE=file
ACCEPT is a list of media types or type patterns allowed for input.
The valid ACCEPT values and meaning of those values is platform dependent.
The value for the VALUE attribute specifies a default file name.
The browser must ask for confirmation before sending any file based
on the default file name.
A value for the SIZE attribute of "width,height
"
would specify a default filename width for the input display and height
sufficient to show some number of files.
A value for the MAXLENGTH attribute specifies a maximum Content-Length
(in bytes) which the responding server is likely to accept
for transferred files.
Including an INPUT element with TYPE=file
requires also specifying
ENCTYPE="multipart/form-data" METHOD=post
on the enclosing FORM element.
If the FORM does not specify this ENCTYPE, the behavior is unspecified
and the file transfer is likely to be rejected by the responding server.
Netscape 2.0 implements FORM-based file upload.
The LANG and DIR attributes are introduced with the
internationalization proposal.
Version 3 proposes the additional TYPE attribute values of
range|scribble
.
A beta version of Netscape includes a TYPE attribute value of jot
which is similar to scribble
.
Version 3 proposes the additional DISABLED, ERROR,
MIN, MAX, and MD attributes.
The Version 3 proposed TYPE=range
uses the proposed MIN and MAX attributes to specify limits to
numeric (real or integer) input.
The proposed default value is halfway between MIN and MAX.
The Version 3 proposed TYPE=scribble
is to allow the user to scribble with a pointing device on top of
the image specified with the SRC attribute.
The Version 3 proposed DISABLED attribute would display this INPUT,
but prohibit user entry/modification.
The Version 3 proposed ERROR attribute defines text to be displayed
in the event that the entered value for this INPUT is invalid.
All elements concerning FORM are Level 2.
"default"
, "circle x,y,r"
,
"rect x,y,w,h"
, and
"polygon x1,y1,x2,y2,..."
.
All elements concerning FORM are Level 2.
Note that the elements
are expressly prohibited by RFC 1866 from being nested
within the SELECT element content
Michael J. Hannah
Sandia National Laboratories
mjhanna@sandia.gov