[an error occurred while processing this directive]

Advanced Option Lists

In our previous option list examples, the value returned to the ACTION program when the form was submitted was the same as the description of the option displayed to the user in the listbox. Here we'll see an example of how you can use small tokens to represent the options (to save space in a spreadsheet for which the data is destined, for example), while still displaying meaningful descriptions to the user. We'll also take a look at a multiple selection list.

Notice that when you submit this form, you get not the option description, but an abbreviated keyword for it:

What would you like to do today?


<SELECT NAME=today SIZE=5>
<OPTION VALUE=drink>Drink Expresso
<OPTION VALUE=read SELECTED>Read A Book
<OPTION VALUE=walk>Take A Stroll
<OPTION VALUE=talk>Talk With Friends
<OPTION VALUE=eat>Eat A Bagel
<OPTION VALUE=veg>Watch TV
<OPTION VALUE="Pig Out">Munch Teddy Grahams
</SELECT> 

<INPUT TYPE=submit VALUE="Submit Decision">
<INPUT TYPE=reset VALUE="Reset to Default Selections">

Here's an example of an option list which uses the MULTI keyword to allow the user to select several of the options (Please note that the WebCom Forms Processor does not support this capability and therefore we don't show a working example):

What items of clothing do you plan to wear?

Hold down Control to select or deselect items separated from one another.
Hold down Shift to select multiple items adjacent to one another.



<SELECT NAME=what-to-wear MULTI SIZE=8>

The MULTIPLE keyword (which can be abbreviated to MULTI) is what permits the user to make more than one selection form the above option list.

Final lesson: Miscellaneous: password and hidden fields

Index of tutorial topics

[an error occurred while processing this directive]