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. ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.