Paul Burchard on HTML 2.0 FORMs

Daniel W. Connolly (connolly@hal.com)
Mon, 11 Jul 1994 11:40:20 -0500


Message-Id: <9407111640.AA14775@ulua.hal.com>
To: html-ig@oclc.com, www-html@www0.cern.ch, karen@hal.com
Cc: Paul Burchard <burchard@geom.umn.edu>
Subject: Paul Burchard on HTML 2.0 FORMs
Date: Mon, 11 Jul 1994 11:40:20 -0500
From: "Daniel W. Connolly" <connolly@hal.com>

------- 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">
<HTML>

<HEAD>
<TITLE>FORM -- Elements</TITLE> <NEXTID
N="z2"></HEAD>

<BODY>

<H1>FORM</H1>

<P>The FORM element is used to delimit a <A
NAME="z1" HREF="../Forms.html">data input form</A> .
There can be several forms in a single document,
but the FORM element can't be nested.

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

<P>When the ACTION is an HTTP URL, the METHOD must be an
HTTP <EM>method</EM> as defined in the IETF draft HTTP standard
(see the <A
HREF="http://info.cern.ch/hypertext/WWW/Protocols/HTTP/Methods.html"
>HTTP method specification</A>).
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 <CODE>application/x-www-form-urlencoded</CODE>).

<P>Under any protocol, the submitted contents of the form
logically consist of <EM>name/value</EM> pairs.
The <EM>names</EM> 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 <EM>values</EM> 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.
</BODY>
</HTML>

------- 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">
<HTML>

<HEAD>
<TITLE>The INPUT element in HTML</TITLE> <NEXTID
N="z4"></HEAD>

<BODY>

<H1>INPUT</H1>

<P>The INPUT element represents a field whose contents may be
edited by the user. It has the following attributes.

<DL>

<DT>NAME

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

<DT>TYPE

<DD>Defines the type of data the field accepts.
Defaults to free text (type TEXT).

<DT>SIZE

<DD>Specifies the size or precision of the field according to
its type.

<DT>MAXLENGTH

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

<DT>VALUE

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

<DT>CHECKED

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

<DT>SRC

<DD>A URL or URN specifying an image; currently for use only
with TYPE=IMAGE.

<DT>ALIGN

<DD>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.
</DL>

<H3>Proposed</H3>

<DL>

<DT>DISABLED

<DD>When present indicates that this field is temporarily disabled.
Browsers should show this by "greying it" out in some manner.

<DT>ERROR

<DD>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.
</DL>

<H2>Types</H2>

<P>The following types of fields can be defined with the TYPE
attribute:

<DL>

<DT>TEXT

<DD>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 <A NAME="z1"
HREF="TEXTAREA.html">TEXTAREA</A>
element for text fields which can accept multiple lines.

<DT>HIDDEN

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

<DT><A NAME="z3">CHECKBOX</A>

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

<DT><A NAME="z2">RADIO</A>

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

<DT>IMAGE

<DD>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 <I>x</I>-coordinate is submitted
under the NAME of the field with ".x" appended, and the
<I>y</I>-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.

<P><EM>Note.</EM>  In future versions of the HTML standard,
this functionality will be folded into an enhanced SUBMIT field.

<DT>SUBMIT

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

<DT>RESET

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


</DL>

<H3>Proposed types</H3>

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

<DL>

<DT>RANGE

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

<DT>INT

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

<DT>FLOAT

<DD>For fields which can accept floating point numbers.

<DT>SCRIBBLE

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

<DT>AUDIO

<DD>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.
</DL>

<H3>Obsolete usage</H3>

<P>When you need to let users enter more than one line of text,
you should use the <A NAME="z1"
HREF="TEXTAREA.html">TEXTAREA</A> element, rather than an INPUT
of type TEXT.
</BODY>
</HTML>

------- End of Forwarded Messages