Creating a Selection List
The next part of the survey form is dedicated to collecting information on how the customer was informed about your companies website. This will provide you with valuable information on what advertisement avenues are working. For example, if most customers were informed by TV adds you placed and none were informed by newspaper advertisements, you might want to focus more on TV adds over newspaper adds. The selection field you'll create in this section will record how the customers were informed about your website. The advertisements you have focused on are listed below:
Because the informed options constitute a predefined list of values , you will display this information with a selection list. A selection list is a list box from which the user selects a particular value or set of values, usually by clicking the item with the mouse. Generally it's a good idea to use selection lists rather than input boxes when you have a fixed set of possible responses.
To create a selection list, use the following set of HTML tags:
<SELECTION NAME=Text>
<Option>Option 1
<Option>Option 2
</SELECT>
where Text is the name you've assigned to the selection field, and Option 1, Option 2, and so forth are the possible values displayed in the selection list. Notice that the values for each option are entered to the right of the <OPTION> tag rather than inside the tag.
To allow the user to select multiple items in the selection list, use the following tag:
<SELECT MULTIPLE>
To display several items in the selection list, or to change the selection list style from a drop-down list box to a fully displayed list box, use the following tag:
<SELECT SIZE=Value>
where Value is the number of items displayed in the list box.
You will now add the informed selection list to the survey form. Return to the surveyform.html file in your text editor. Directly above the </TABLE> tag, insert the following lines (indenting where applicable):
<TR>
<TD>How Were You Informed About 'The Name Of Your Business'</TD>
<TD><SELECT NAME=INFORMED>
<OPTION>Friends
<OPTION>TV
<OPTION>Newspaper
<OPTION>Through Web Search Engines
<OPTION>Other
</SELECT></TD>
</TR>
Save your changes to the file, then load the file in your Web browser. The
form now contains the selection list. However, your form is now stretched out.
Put a <BR> behind the word informed. You may place more page breaks where
they are needed. Note that the first item in the list is displayed in the selection
list box. Click the flavor drop-down list arrow and verify that the rest of
the options you entered with the <OPTION> tag are displayed.