-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForms.html
More file actions
executable file
·139 lines (105 loc) · 4.51 KB
/
Forms.html
File metadata and controls
executable file
·139 lines (105 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE HTML PUBLIC "-//W3O//DTD WWW HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>User Input Forms in HTML</TITLE> <NEXTID
N="z18"></HEAD>
<BODY>
<H1>Fill-out Forms and Input fields</H1>
<P>Forms are composed by placing input fields within paragraphs,
preformatted/literal text, lists and tables.
This gives considerable scope in designing the layout of forms.
<H2>Elements</H2>
<P>The form features use the following elements which are all
known as HTML level 2 elements.
<DL>
<DT><A NAME="z12" REL="SUBDOCUMENT"
HREF="Elements/FORM.html">FORM</A>
<DD>a form within a document.
<DT><A NAME="z13" REL="SUBDOCUMENT"
HREF="Elements/INPUT.html">INPUT</A>
<DD>one input field.
<DT><A NAME="z14" REL="SUBDOCUMENT"
HREF="Elements/TEXTAREA.html">TEXTAREA</A>
<DD>a multline input field.
<DT><A NAME="z15" REL="SUBDOCUMENT"
HREF="Elements/SELECT.html">SELECT</A>
<DD>A selection from a finite set of options.
<DT><A NAME="z16" REL="SUBDOCUMENT"
HREF="Elements/OPTION.html">OPTION</A>
<DD>one option within a SELECT.
</DL>
<H3>Proposed Elements</H3>
<DL>
<DT><A NAME="z17" REL="SUBDOCUMENT"
HREF="Elements/HTEXTAREA.html">HTEXTAREA</A>
<DD>an input field for hypertext.
<DD>
</DL>
<H2></H2>
<P>Each variable field is defined by an <A
NAME="z3" HREF="Elements/INPUT.html">INPUT</A> ,
TEXTAREA, or OPTION element and must have an NAME attribute which
uniquely names the field in the document.
Additional optional attributes can be used to specify the type
of the field (defaults to free text), its size/precision,
its initial value and whether the field is currently disabled
or in error:
<H2>Example</H2>
<PRE><FORM ACTION="mailto:www_admin@info.cern.ch">
<MH HIDDEN>Subject: WWW Questionaire</MH>
Please help up to improve the World Wide Web by filling in the
following questionaire:
<P>Your organization? <INPUT NAME="org" SIZE="48">
<P>Commercial? <INPUT NAME="commerce" TYPE=checkbox>
How many users? <INPUT NAME="users" TYPE=int>
<P>Which browsers do you use?
<UL>
<LI>X Mosaic <INPUT NAME="browsers" TYPE=checkbox VALUE="xmosaic">
<LI>Cello <INPUT NAME="browsers" TYPE=checkbox VALUE="cello">
<LI>Others <TEXTAREA NAME="others" COLS=48 ROWS=4></TEXTAREA>
</UL>
A contact point for your site: <INPUT NAME="contact" SIZE="42">
<P>Many thanks on behalf of the WWW central support team.
<P ALIGN=CENTER><INPUT TYPE=submit> <INPUT TYPE=reset>
</FORM>
</PRE>
<P>This fictitious example is a questionnaire that will be emailed
to www_admin@info.cern.ch.
<P>Servers can disable forms by sending an appropriate header
or by an attribute on the optional HTMLPLUS element at the very
start of the document, e.g. <htmlplus forms=off>.
<P>Here, the <P> and <UL> elements have been
used to lay out the text (and input fields.
The browser has changed the background color within the <A
NAME="z11" HREF="Elements/FORM.html">FORM</A> element to distinguish
the form from other parts of the document.
The browser is responsible for handling the input focus,
i.e. which field will currently get keyboard input.
<P>For many platforms there will be existing conventions for
forms, e.g. "tab" and "shift-tab" keys to move the keyboard focus
forwards and backwards between fields, while an "Enter" key submits
the form. In the example, the "submit" and "reset" buttons are
specified explicitly with special purpose fields.
The "submit" button is used to email the form or send its contents
to the server as specified by the ACTION attribute,
while the "reset" button resets the fields to their initial values.
When the form consists of a single text field,
it may be appropriate to leave such buttons out and rely on the
"Enter" key.
<P>The <A NAME="z2" HREF="Elements/INPUT.html">INPUT</A> element
is used for a large variety of typed of input fields.
<P>When you need to let users enter more than one line of text,
you should use the <A NAME="z4"
HREF="Elements/TEXTAREA.html">TEXTAREA</A> element.
<H2>Representing choices</H2>
<P>The <A NAME="z5"
HREF="Elements/INPUT.html#z2">RADIO</A> and <A
NAME="z6" HREF="Elements/INPUT.html#z3">CHECKBOX</A> types of<A
NAME="z8" HREF="Elements/INPUT.html"> INPUT</A> field can be
used to specify multiple choice forms in which every alternative
is visible as part of the form. An alternative is to use the
<A NAME="z7" HREF="Elements/SELECT.html">SELECT</A> element which
is generally rendered in a more compact fashion as a pull down
combo list.
</BODY>
</HTML>