Range form field type
From Joomla! Documentation
The ‘range' form field type provides a horizontal slider for numeric input. While the default value can be set, there is no indication of the actual value being chosen, just the position of the slider’s thumb. Available from
- type (mandatory) must be range.
- name (mandatory) is the unique name of the field.
- label (optional) (translatable) is the descriptive title of the field, and will appear in the pop-up when hovering over label as well.
- description (optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.
- default (optional) (translatable) is the initial default value.
- class (optional) is a CSS class name for the HTML form field.
- min (optional) this value is the lowest that can be chosen.
- max (optional) this value is the highest that can be chosen.
- step (optional) if user click up/down arrow current value will change by this attribute (this attribute value will be added or subtracted to current field value).
- required (optional) should the user be required to enter data in this field?
Example XML field definition which would create a slider with possibility to choose values between 0 and 0.5 and change current value by 0.1 as the slider is moved left or right.
<field name=“myrange" type="range" default=“0" label="Range from -0.5 to 0.5 step 0.1" description="" min=“-0.5" max=“0.5" step="0.1" />