User Guide
388 Chapter 2: ColdFusion Tags
• Added on-prefixed attributes.
• Added enabled, group, height, label, queryPosition, tooltip, visible, and width
attributes.
Attributes
The following table lists attributes that ColdFusion uses directly. The tag also supports all HTML
select tag attributes that are not on this list, and passes them directly to the browser.
Note: Attributes that are marked as Flash only are not handled by the skins provided with
ColdFusion MX. They are, however, included in the generated XML.
Attribute Req/Opt;
Format
Default Description
name Required;
All
Name of the select form element.
label Optional;
Flash and
XML
Label to put next to the control on a Flash or XML-format
form.
style Optional;
All
In HTML or XML format forms, ColdFusion passes the
style attribute to the browser or XML.
In Flash format, must be a style specification in CSS
format, with the same syntax and contents as used in
Macromedia Flex for the corresponding Flash element.
size Optional;
All
1 Number of entries to display at one time. The default, 1,
displays a drop-down list. Any other value displays a list
box with
size number of entries visible at one time.
required Optional;
All
No • Yes: a list element must be selected when the form is
submitted.
Note: This attribute has no effect if you omit the
size
attribute or set it to 1, because the browser always submits
the displayed item. You can work around this issue: format
forms by having an initial
option tag with value=" " (note the
space character between the quotation marks).
• No
message Optional;
All
Message to display if
required = "Yes" and no selection is
made.
onError Optional;
HTML and
XML
Custom JavaScript function to execute if validation fails.
multiple Optional;
All
No • Yes: allows selecting multiple elements in drop-down list.
• No
query Optional;
All
Name of query to populate drop-down list.
value Optional;
All
Query column to use for the value of each list element.
Used with the
query attribute.