INPUT
Description
The INPUT element is used to specify a simple input field
as part of the contents in a FORM element.
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 is 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.
Minimum Attributes
<INPUT>
All Possible Attributes
<INPUT
TYPE="text | password | checkbox | radio | submit | reset | hidden | image | file | range | scribble | jot"
LANG="..."
DIR=ltr|rtl
ID="..."
CLASS="..."
NAME="..."
VALUE="..."
SRC="..."
CHECKED
SIZE="..."
MAXLENGTH=number
ALIGN=top|middle|bottom|left|right
ACCEPT="..."
DISABLED
ERROR="..."
MIN=number
MAX=number
MD="...">
Elements Allowed Within...
The INPUT element is defined as having no content.
Allowed In Content Of...
Variations
RFC 1866 defines the TYPE attribute values of
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.