When an HTML or CFML form contains a list of check boxes with the same name or a multiple-selection list box (that is, a box in which users can select multiple items from the list), the user's entries are made available as a comma-delimited list with the selected values. These lists can be very useful for a wide range of input types.
Note: If the user does not select a check box or make a selection from a list box, no variable is created. The cfinsert
and cfupdate
tags do not work correctly if there are no values. To prevent errors, make the form fields required, use dynamic SQL, or use the cfparam
tag to set a default value for the form field.
This section describes the following topics: