cfselect

Overview ColdFusion Open BlueDragon Lucee

Constructs a drop-down list box form control. Used within a cfform tag. You can populate the list from a query, or by using the HTML option tag.

Attributes

Name Required Type Default Description
8
bind No String A bind expression that dynamically sets an attribute of the control.
8
bindAttribute No String Specifies the HTML tag attribute whose value is set by the bind attribute. You can only specify attributes in the browser’s HTML DOM tree, not ColdFusion- specific attributes. Ignored if there is no bind attribute.
8
bindOnLoad No Boolean false A Boolean value that specifies whether to execute the bind attribute expression when first loading the form. Ignored if there is no bind attribute.
3
casesensitive No is compare for selected case sensitive or not
class No
datafld No
dataformatas No
datasrc No
dir No
disabled No
display No String Query column to use for the display label of each list element. Used with query attribute.
8
editable No Boolean false Boolean value specifying whether you can edit the contents of the control.
enabled No Boolean true Flash only: Boolean value specifying whether to show the control. Space that would be occupied by an invisible control is blank. Default: true
group No String Query column to use to group the items in the drop-down list into a two-level hierarchical list..
height No Numeric The height of the control, in pixels.
id No String ID for form input element.
label No String Label to put next to the control on a Flash or XML-format form.
lang No
message No String Message to display if required="true" and no selection is made.
multiple No Boolean false - true: allow selecting multiple elements in drop-down list - false: don't allow selecting multiple elements Default: false
name Yes String Name of the select form element
8
onbinderror No String The name of a JavaScript function to execute if evaluating a bind expression results in an error. The function must take two attributes: an HTTP status code and a message.
onblur No
onchange No String JavaScript (HTML/XML) or ActionScript (Flash) to run when the control changes due to user action.
onclick No String JavaScript to run when the user clicks the control.
ondblclick No
onerror No String Custom JavaScript function to execute if validation fails.
onfocus No
onkeydown No String JavaScript (HTML/XML) or ActionScript (Flash) ActionScript to run when the user depresses a keyboard key in the control.
onkeypress No
onkeyup No String JavaScript (HTML/XML) or ActionScript (Flash) to run when the user releases a keyboard key in the control.
onmousedown No String JavaScript (HTML/XML) or ActionScript (Flash) to run when the user releases a mouse button in the control.
onmousemove No
onmouseout No
onmouseover No
onmouseup No String JavaScript (HTML/XML) or ActionScript (Flash) to run when the user presses a mouse button in the control.
passthrough No String This attribute is deprecated. Passes arbitrary attribute-value pairs to the HTML code that is generated for the tag. You can use either of the following formats: passthrough="title=""myTitle""" passthrough='title="mytitle"'
query No String Name of query to populate drop-down list.
queryposition No String above If you populate the options list with a query and use HTML option child tags to specify additional entries, determines the location of the items from the query relative to the items from the option tags: - above: Put the query items above the options items. - below: Put the query items below the options items. Default: above
required No Boolean false If true a list element must be selected when 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). Default: false
selected No String One or more option values to preselect in the selection list. To specify multiple values, use a comma-delimited list. This attribute applies only if selection list items are generated from a query. The cfform preservedata attribute value can override this value.
size No Numeric 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.
8
sourceForTooltip No String The URL of a page to display as a tool tip. The page can include CFML and HTML markup to control the tip contents and format, and the tip can include images. If you specify this attribute, an animated icon appears with the text "Loading..." while the tip is being loaded.
style No String 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. Post alpha we will document specifics.
tabindex No
title No
tooltip No String Flash only: Text to display when the mouse pointer hovers over the control.
value No String Query column to use for the value of each list element. Used with query attribute.
visible No Boolean true Flash only: Boolean value specifying whether to show the control. Space that would be occupied by an invisible control is blank. Default: true
width No Numeric The width of the control, in pixels.