Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Processing List Boxes
Another field type you will frequently use is the list box. Using list boxes is an efficient way to enable users to select one or more options. If a list box is created to accept only a single selection, you can be guaranteed that a value is always returned. If you don’t set one of the options to be pre-selected, the first one in the list is selected. An option always has to be selected.
List boxes that allow multiple selections also allow no selections at all. If you use a multiple-selection list box, you once again have to find a way to ensure that ColdFusion doesn’t generate variable is undefined errors.
Listing 12.6 contains the same data-entry form you just created, but it replaces the option buttons with a list box. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access