Paul Burchard on HTML 2.0 FORMs
Daniel W. Connolly (connolly@hal.com)
Mon, 11 Jul 1994 11:40:20 -0500
------- Forwarded Messages
Date: Mon, 11 Jul 94 04:24:59 -0500
From: Paul Burchard <burchard@horizon.gw.umn.edu>
Message-Id: <9407110924.AA03406@horizon.gw.umn.edu>
To: "Daniel W. Connolly" <connolly@hal.com>
Subject: Revised HTML 2.0 FORM and INPUT specifications...
Cc: Dave Raggett <dsr@hplb.hpl.hp.com>
Reply-To: burchard@geom.umn.edu
Greetings,
The two following letters contain my corrected versions of the FORM
and INPUT specifications for HTML 2.0. Due to the extensive editing,
I am submitting the entire documents in lieu of diffs. Please let me
know if I should copy these revisions to anyone else (or to the
mailing list) for comments.
As far as I am aware, the only item in these documents not supported
by X Mosaic 2.4, is the ability of the SUBMIT field to use the NAME
attribute when it is supplied. (I could not bear to erase this
feature from the spec myself, though. :-)
- --------------------------------------------------------------------
Paul Burchard <burchard@geom.umn.edu>
``I'm still learning how to count backwards from infinity...''
- --------------------------------------------------------------------
------- Message 2
Date: Mon, 11 Jul 94 04:25:07 -0500
From: Paul Burchard <burchard@horizon.gw.umn.edu>
Message-Id: <9407110925.AA03411@horizon.gw.umn.edu>
To: "Daniel W. Connolly" <connolly@hal.com>
Subject: Submission: revised HTML 2.0 FORM specification
Cc: Dave Raggett <dsr@hplb.hpl.hp.com>
Reply-To: burchard@geom.umn.edu
<!DOCTYPE HTML PUBLIC "-//W3O//DTD WWW HTML 2.0//EN">
FORM -- Elements
FORM
The FORM element is used to delimit a data input form .
There can be several forms in a single document,
but the FORM element can't be nested.
The ACTION attribute is a URL specifying the location
to which the contents of the form will be submitted in
order to elicit a response. If the ACTION is missing, the
URL for the document itself will be assumed. The details
of how the data are submitted to the location specified by
the ACTION vary with the access protocol of the URL, and
also with the values of the METHOD and ENCTYPE
attributes. In general, the METHOD attribute selects
variations in the protocol, while the ENCTYPE attribute
specifies the format of the submitted data, in case the
protocol does not impose a format itself. This standard only
defines and requires support for the HTTP access protocol.
When the ACTION is an HTTP URL, the METHOD must be an
HTTP method as defined in the IETF draft HTTP standard
(see the HTTP method specification).
The default method is GET, although for many applications,
the POST method will be preferred. In the latter case,
the ENCTYPE attribute is a MIME type
specifying the format of the POSTed data
(by default application/x-www-form-urlencoded
).
Under any protocol, the submitted contents of the form
logically consist of name/value pairs.
The names are usually equal to the NAME
attributes of the various interactive elements in the FORM.
Note that the names are not guaranteed to be unique keys,
nor are the NAMEs of FORM elements required to be distinct.
The values encode the user's input to the corresponding
interactive elements. Elements capable of displaying
a default value will return a name/value pair even
when they receive no explicit user input.
------- Message 3
Date: Mon, 11 Jul 94 04:25:20 -0500
From: Paul Burchard <burchard@horizon.gw.umn.edu>
Message-Id: <9407110925.AA03416@horizon.gw.umn.edu>
To: "Daniel W. Connolly" <connolly@hal.com>
Subject: Submission: revised HTML 2.0 INPUT specification
Cc: Dave Raggett <dsr@hplb.hpl.hp.com>
Reply-To: burchard@geom.umn.edu
<!DOCTYPE HTML PUBLIC "-//W3O//DTD WWW HTML 2.0//EN">
The INPUT element in HTML
INPUT
The INPUT element represents a field whose contents may be
edited by the user. It has the following attributes.
- NAME
- Symbolic name used when transferring the form's contents.
This attribute is required for most INPUT types, and
is normally used to provide a unique identifier for a
field, or for a logically related group of fields.
- TYPE
- Defines the type of data the field accepts.
Defaults to free text (type TEXT).
- SIZE
- Specifies the size or precision of the field according to
its type.
- MAXLENGTH
- The maximum number of characters that will be accepted as
input. This can be greater that specified by SIZE,
in which case the field will scroll appropriately.
The default is unlimited.
- VALUE
- The initial displayed value of the field, if it displays
a textual or numerical value; or the value to be returned when
the field is selected, if displays a Boolean value.
This attribute is required for radio buttons.
- CHECKED
- When present indicates that a checkbox or radio button is
selected. Unselected checkboxes and radio buttons do not return
name/value pairs when the form is submitted.
- SRC
- A URL or URN specifying an image; currently for use only
with TYPE=IMAGE.
- ALIGN
- Vertical alignment of the image; currently for use only
with TYPE=IMAGE. The possible values are exactly the same as
for the ALIGN attribute of the IMG element.
Proposed
- DISABLED
- When present indicates that this field is temporarily disabled.
Browsers should show this by "greying it" out in some manner.
- ERROR
- When present indicates that the field's initial value is
in error in some way, e.g. because it is inconsistent with the
values of other fields. Servers should include an explanatory
error message with the form's text.
Types
The following types of fields can be defined with the TYPE
attribute:
- TEXT
- Single line text entry fields. Use the SIZE attribute to
specify the visible width in characters,
e.g. SIZE="24" for a 24 character field.
The MAXLENGTH attribute can be used to specify an upper limit to the
number of characters that can be entered into a text field,
e.g. MAXLENGTH=72 . Use the TEXTAREA
element for text fields which can accept multiple lines.
- HIDDEN
- No field is presented to the user, but the content of the
field is sent with the submitted form. This value may be used
to transmit state information about client/server interaction.
- CHECKBOX
- Used for simple Boolean attributes, or for
attributes which combine several Boolean flags.
The latter is represented by a number of checkbox
fields each of which has the same NAME. Each selected
checkbox generates a separate name/value pair in the
submitted data, even if this results in duplicate names.
The default VALUE for checkboxes is "on".
- RADIO
- For attributes which can take at most a single value
from a set of alternatives. Each radio button field in the
group should be given the same NAME. Only the selected
radio button in the group will generate a name/value pair
in the submitted data. Radio buttons require an explicit
VALUE attribute.
- IMAGE
- An image field upon which you
can click with a pointing device, causing the form to be
immediately submitted. The coordinates of the selected point,
measured in pixel units from the upper left-hand corner of the
image, are returned (along with the other contents of the form)
in two name/value pairs. The x-coordinate is submitted
under the NAME of the field with ".x" appended, and the
y-coordinate is submitted under the NAME of the field
with ".y" appended. Any VALUE attribute is ignored.
The image itself is specified by the SRC attribute, exactly
as for the IMG element.
Note. In future versions of the HTML standard,
this functionality will be folded into an enhanced SUBMIT field.
- SUBMIT
- This is a button that, when pressed, submits the form.
The VALUE attribute can be used to provide a (non-editable)
label to be displayed on the button (the default label is
application-specific). The NAME attribute is not
required; a submit button will only contribute a name/value
pair to the submitted data if it both has a NAME, and was
the button that was pressed in order to submit the form.
- RESET
- This is a button that, when pressed, resets the form's
fields to their initial values, as defined by each
field's VALUE attribute. The VALUE attribute of the
reset field itself can be used to provide a
(non-editable) label to be displayed on the button (the
default label is application-specific). The NAME
attribute is not required, since a reset button never
contributes a name/value pair to the data returned by the
form.
Proposed types
The following INPUT types have been proposed for inclusion
into future versions of the HTML standard. The descriptions
included here are not intended to serve as final specifications.
- RANGE
- This allows you to specify an integer range with the MIN
and MAX attributes, e.g. MIN=1 MAX=100 .
Users can select any value in this range.
- INT
- For entering integer numbers, the maximum number of digits
can be specified with the SIZE attribute (excluding the sign
character), e.g. size=3 for a three digit number.
- FLOAT
- For fields which can accept floating point numbers.
- SCRIBBLE
- A field upon which you can write with a pen or mouse, creating
for example signatures or sketches. The scribble may involve time
and pressure data in addition to the basic ink data.
The background can be initialized to an image using the SRC
attribute.
The VALUE attribute is ignored.
- AUDIO
- This provides a way of entering spoken messages into a form.
Browsers might show an icon which when clicked pops-up a set
of tape controls that you can use to record and replay messages.
The initial message can be set by specifying a URL with the SRC
attribute. The MAX attribute can be used to limit the length
of the input, measured in seconds. The VALUE attribute is ignored.
Obsolete usage
When you need to let users enter more than one line of text,
you should use the TEXTAREA element, rather than an INPUT
of type TEXT.
------- End of Forwarded Messages