slider

Creates a sliding control, similar to a volume control, that lets the user set a value within a specific range. The slider is always horizontal.

Note: This item is only available in an XForms form. There is no equivalent for an XFDL form.

Available options

acclabel, active, bgcolor, border, borderinfo, focused, fontcolor, fontinfo, format, help, itemlocation, itemnext, itemprevious, label, labelbgcolor, labelborder, labelfontcolor, labelfontinfo, next, previous, printbgcolor, printfontcolor, printlabelbgcolor, printlabelfontcolor, printvisible, readonly, size, suppresslabel, value, visible, xformsenabled, xformsreadonly, xformsrequired, xformsvalid, xforms:range

Example

The following example shows and slider that allows the user to select any number between 1 and 10:

   <slider sid="rating">
      <xforms:range ref="rating" start="1" end="10" step="1">
         <xforms:label>Rate this form on a scale of 1 to 10</xforms:label>
      </xforms:range>
   </slider>

Usage details

  1. The numbers that indicate the value are always shown at the end the slider.
  2. The fontcolor and fontinfo option affect the numbers that show the value of the slider.
  3. The single node binding in the xforms:range option creates a link between the value option for the slider and the bound element in the data model, so that they share data. When the user makes a selection, that value is stored in both locations.
  4. The contents of the value option for the slider are never serialized.
  5. The suppresslabel option suppresses the slider's label, but does not affect the numbers that indicate the value.