Lava Shortcode - Range Slider
Description
Include an adjustable slider control to select numeric values or ranges.
Documentation
This control displays a range slider
Example Usage
{[ rangeslider label:'Range Slider' min:'0' max:'100' step:'.1' value:'10' isrequired:'false']}
Parameter List
This control supports the following parameters:
- label (Range Slider) - The label to display above the control.
- showlabel (true) - Whether to display label.
- min (0) - The minimum amount on slider
- max (100) - The maximum amount on slider
- step (1) - The amount of increment at a time
- value(0) - The amount to initially set the control to.
- isrequired (false) - Require the range slider to have a value
- validationmessage (Please select a value.) - Message to display when the value is not valid.
Markup
{[ rockcontrol id:'rc-{{ '' | UniqueIdentifier }}' label:'{{ label }}' showlabel:'{{ showlabel }}' controltype:'range-slider' isrequired:'{{ isrequired }} validationmessage:'{{ validationmessage }}']}
<input type="text" id='{{ id }}' />
<script>
Rock.controls.rangeSlider.initialize(
{
controlId: '{{ id }}',
min: '{{ min }}',
max: '{{ max }}',
step: '{{ step }}',
from: '{{ value }}',
});
</script>
{[ endrockcontrol ]}