User Guide

Table Of Contents
Building slider bar controls 643
2.
Save the file as selectbox.cfm and view it in your browser.
The following figure shows the output of this code:
Because the tag includes the
multiple attribute, the user can select multiple entries in the list
box. Also, because the
value tag specifies Emp_ID, the primary key for the Employee table,
Employee IDs (not first names) get passed in the Form.Employee variable to the application page
specified in the
cfform action attribute.
You can use a query to create a two-level hierarchical list grouped by one of the query columns.
For an example of this use, see the example for the
cfselect entry in CFML Reference.
Building slider bar controls
You can use the cfslider control in a cfform tag to create a slider control and define a variety of
characteristics, including label text, label font name, size, boldface, italics, and color, and slider
range, positioning, and behavior. Slider bars are useful because they are highly visual and users can
only enter valid values. The
cfslider tag is not supported in Flash format forms.
To create a slider control:
1.
Create a ColdFusion page with the following content:
<cfform name="Form1" action="submit.cfm">
<cfslider name="myslider"
bgcolor="cyan"
bold="Yes"
range="0,1000"
scale="100"
value="600"
fontsize="14"
label="Slider %value%"
height="60"
width="400">
</cfform>
2.
Save the file as slider.cfm and view it in your browser.
The following figure shows the output of this code:
To get the value of the slider in the action page, use the variable Form.slider_name; in this case,
Form.myslider.