Characters like "&", "%", and "$" in the text typed into the
text entry field are automatically escaped (into hex form: a
percent sign followed by a two-digit hex value corresponding to
the ASCII value of the character) when the query is constructed.
For example, the string "&%$" becomes "%26%25%24".
By default, an INPUT tag corresponds to a text entry
field. The TYPE attribute lets you change this --
the "submit" type indicates a special pushbutton that causes the
query to be submitted when it's pushed. Other types are
demonstrated in the other examples.
Because this fill-out form contains only a single text entry
field, the query can be submitted by pressing return in the text
entry field (as well as by pressing the "Submit Query" button).
Each text entry field is given a distinct NAME
attribute.
The query that results from this form looks like this:
"?entry1=blah&entry2=blargh&entry3=blorf" (assuming "blah"
had been typed into the first field, "blargh" into the second,
and "blorf" into the third).
If nothing is typed into any of the fields, the corresponding
"name=value" pairs will still be present in the query, with the
value simply absent. So, if you type "blah" into the first field
and "blorf" into the third but nothing into the second, the query
is "?entry1=blah&entry2=&entry3=blorf".
This is another fill-out form example, with multiple text entry
fields and checkboxes.
Things you may want to note:
By default, checkboxes are off.
When the query is packaged up, off checkboxes are ignored
completely and on checkboxes are given the values specified by
the VALUE attribute in each INPUT tag.
Multiple checkboxes can have the same NAME, if
desired.
Checkboxes are very similar in use and interpretation on the
server side to text entry fields.
Checkboxes are "n of many": Any number of them can be on or off
at any time. (The alternative scheme, "one of many", in which
only one out of a group of several toggle buttons can be on, is
not yet supported by Mosaic.)
This is another fill-out form example, with default values for some
text entry fields and checkboxes.
Things you may want to note:
A VALUE attribute to an INPUT tag of
TYPE "text" specifies the default value of that text
field.
A VALUE attribute to an INPUT tag of
TYPE "checkbox" specifies the value that checkbox
takes when it's on. If this attribute is not present, the
default is "on".
A CHECKED attribute to a checkbox specifies that the
checkbox is on by default.
Similar to how an INPUT tag of TYPE
"submit" is a special query submission button, an
INPUT tag of TYPE "reset" is a special
form reset button. (If all of the input elements have no default
values, this may be better termed a "clear" button; the label on
the pushbutton included in the form is controlled by the
VALUE attribute to that INPUT tag.)
This is another fill-out form example, with toggle buttons.
Things you may want to note:
Radio buttons (type RADIO) are one-of-many input
elements. The "many" is all radio buttons in the form with the
same NAME.
In other ways, RADIO is the same as
CHECKBOX.
Multiple sets of radio buttons (radio buttons with the same
NAME) can be in a single form. This may require
careful document/interface design to keep things obvious -- don't
intermix radio buttons of different NAME values, or
the user won't understand how the interface works.