To make your guestbook or form a little different, you can
customize it to suit you. You can add checkboxes, drop down lists and more.
TEXT
INPUT
type=text
A single line text input just like on the guestbook page. Very basic.
name="name you choose"
Tells the guestbook CGI or email CGI what to put on the page or in the email.
size=number
The length of the text box as it appears in the browser window.
maxlength=number
The maximum number of characters allowed to be filled in. This keeps anyone from typing an
unlimited amount and clogging up your form return
value="text to appear"
The default text to appear in the window. i.e. http:// (don't use this if your form field
is a required field or your default text may be what you get back in your form if the user
doesn't replace your default text with their own.
Single line of text:
<INPUT type=text name="text-box" size=50
maxlength=75 value="default text">
type=radio Radio button. All buttons within the same group must have
the same name or more than one may be checked. A single radio
button can be shown, provided it has a unique name.
name=name you choose Tells the browser which radio button group the radio
button belongs to. That way only one of them can be checked. Tells the
form-to-mail script what to return when describing the dialog item contents (that way you
know what their answer was when you see the form).
value=text The text that you see in your posting page or your
email when that button is checked.
checked Specify the default radio button to be checked or not.
type=checkbox
Checkbox group. Again, all buttons within the same group must have the same name.
A single checkbox can be shown, provided its name is unique.
name=name you choose Tells the browser which checkbox group the checkbox
belongs to. Tells the CGI script what to
return when describing the dialog item contents (that way you know what their answer was
when you see the form).
value=text The text you see in your posting page or your email
when the checkbox is checked.
checked Specify a default checkbox to be checked or not.
<INPUT type=checkbox name="CheckBox"
value="1"> one
<INPUT type=checkbox name="CheckBox" value="2"> two
<INPUT type=checkbox name="CheckBox" value="3" checked> three
type=image
Image field. The whole form is sent when the user clicks on
the graphic. The value from the image is in the form of pixel coordinates, taken from the
top left of the graphic. They are returned in the form name.x and name.y,
where x and y are the coordinates of the mouse-click and name is the
value given in the name attribute.
name=text Tells the form-to-mail script what to return when
describing the dialog item contents (so you know what the user was responding to when they
fill in the dialog item).
src=URL Specify the location of the graphic in the same way as
you would with the img tag.
align=left|right|middle|top|texttop| absmiddle|baseline|bottom|absbottom Specify the alignment of the graphic in the same way as you would with the
img tag.
border=pixels Specify the border width of the graphic in the same way
as you would with the img
tag.
height=pixels, width=pixels Specify the height and width of the graphic in the same
way as you would with the img
tag.
hspace=pixels, vspace=pixels Specify the vertical and horizontal space around the
graphic in the same way as you would with the img tag.
type=file Netscape 3+ and MS Internet Explorer 3+ only.
You can use this with some servers if you have an incoming directory. This input
type enables the user to send a file and should bring up a text box and browse button (no
browse button appears with Internet Explorer). This input type is used in forms for
uploading files, i.e. Geocities and Tripod. It requires a server side CGI that allows
program uploading.
name=text Name of the file to send.
size=n Specifies the size of the text box in characters.
maxlength=n Specifies a maximum length for the filename in
characters.
accept=MIME content type Specify the types of files accepted using MIME content
types in a comma separated list.
name=Name you choose Tells the form-to-mail script what to return when
describing the dialog item contents (that way you know what their answer was when you see
the form).
cols=number Specify the width of the text entry area in characters.
rows=number Specify the height of the text entry area in rows.
wrap=off | virtual | physical Netscape 2+ IE4 only. Specifies how the text input
should wrap. Setting wrap=off means
no wrapping will occur - text is sent exactly as typed. Setting wrap=virtual
means the display wraps but the text is sent as typed. Setting wrap=physical
means the display wraps and text is sent with line breaks at all
wrap points. You may want to consider this to keep the text within certain boundaries on
your posting page.
Please give me your comments:<br>
<textarea name="comments" cols=50 rows=10 wrap=physical>Type your comments here</textarea>
<select> <option>
List box. Use an <option> element with the <select> tags for each of the items in your list. You may have seen list boxes used as
hyperlinks to other locations. This is Java
or a CGI program and not available on AOL or contact your server administrator for the
script. There is a code for using a form button for a link. It's at the bottom of the
page.
name=name you choose Tells the form-to-mail script what to return when
describing the dialog item contents (so you know what the user was responding to when they
fill in the dialog item).
size=number Specify the number of list items shown at any one time.
If this attribute is left out, the list box defaults to a drop-down list.
multiple Allows the user to make more than one selection from the
same list.
value Used with the <option> element. This specifies what is returned in the e-mail or posted for a
selected item. The text between the opening and closing option tags is what
appears in the list box.
selected Used with the <option> element to specify a default selection. You may want to include the option
of none-selected as your first option and the tag: <OPTION
selected value="none">None-selected</OPTION> in your list. You can only
have one option selected per list.
Choose one of the following:
<SELECT name="Single-line ListBox example">
<OPTION value="1">one</OPTION>
<OPTION selected value="2">two</OPTION>
<OPTION value="3">three</OPTION>
<OPTION value="4">four</OPTION>
</SELECT>
Another choice:
<SELECT name="Multi-line, multi-selection Listbox example" size=3
multiple>
<OPTION value="5">five</OPTION>
<OPTION selected value="6">six</OPTION>
<OPTION value="7">seven</OPTION>
<OPTION value="8">eight</OPTION>
</SELECT>