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. It is available from Joomla 3.2 version.

Example XML field definition:

<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" />

This will 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.

Parameters

Mandatory Parameters

  • type must be range.
  • name is the unique name of the field.
  • label (translatable) is the descriptive title of the field, and will appear in the pop-up when hovering over label as well.

Optional Parameters

  • description (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.
  • default (translatable) is the initial default value.
  • class is a CSS class name for the HTML form field.
  • min: this value is the lowest that can be chosen.
  • max: this value is the highest that can be chosen.
  • step: if user click up or down arrow current value will change by this attribute. This attribute value will be added or subtracted to current field value.
  • required: should the user be required to enter data in this field?