164
Building Slider Bar Controls
You can use the
formatting options for slider label text, label font name, size, boldface, italics, and
color, as well as slider scale increments, range, positioning, tick marks, and behavior.
Slider bars are useful because they are highly visual and users cannot enter invalid
values.
To create a slider control:
1
2
3
To get the value of the slider in the action page, use the variable Form.slider_name;
in this case, Form.myslider.
cfslider
Create a new file in ColdFusion Studio.
Modify the file so that it appears a follows:
<cfform name="Form1" action="submit.cfm"
method="Post">
<cfslider name="myslider"
bgcolor="cyan"
bold="Yes"
range="0,1000"
scale="100"
value="600"
fontsize="14"
label="Slider %value%"
height="60"
tickmarkmajor="True"
width="400">
</cfform>
Save the file as
slider.cfm
control to create a slider control and define a wide range of
and view it in your browser.
Chapter 9 Building Dynamic Forms