xforms:range

Purpose

A form control that allows the user to choose a value from a range of values.

The attributes support numeric data types (e.g. dates, times, numbers, etc.). All three attribute values must be of the same type.

Contains

Attributes

Attribute Description Type Default Options Use
end An optional maximum bound of possible values. xs:anySimpleType 100    optional 
start An optional minimum bound of possible values. xs:anySimpleType   optional 
step An optional delta-value to use for incrementing or decrementing the value. xs:anySimpleType 1   optional 

Attribute groups

Example

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:si="http://www.volantis.com/xmlns/2006/01/xdime2/si"
  xmlns:xforms="http://www.w3.org/2002/xforms">
  <head>
    <title>xforms:range</title>
    <xforms:model id="stats">
      <xforms:instance>
        <si:instance>
          <si:item name="balance" type="xforms:float"/>
        </si:instance>
      </xforms:instance>
    </xforms:model>
  </head>
  <body>
    <div>
      <xforms:range model="stats" ref="balance" start="-2.0" end="2.0" step="0.5">
        <xforms:label>Balance</xforms:label>
      </xforms:range>
    </div>
  </body>
</html>

Related topics