The range question type displays a slider (or equivalent input) that lets respondents pick a number within a defined minimum and maximum. It is ideal for collecting ratings, satisfaction scores, or any numeric value where you want to constrain the range visually rather than relying on a text input with constraints.

Basic XLSForm Specification

typenamelabelparameters
rangesatisfactionHow satisfied are you with the service?start=1 end=5 step=1

The parameters column defines the slider bounds and step size:

ParameterDescriptionDefault
startMinimum value (inclusive)0
endMaximum value (inclusive)10
stepIncrement between valid values1

For more details on the standard range question type, see the XLSForm specification.

Uses

Range questions are commonly used for:

  1. Satisfaction or rating scales (e.g., 1–5 or 0–10)
  2. Likert-style numeric scales
  3. Collecting measurements where only discrete values are valid
  4. Age brackets or score ranges where a slider improves usability over a text field

Example Usage

Basic rating scale

typenamelabelparameters
rangeoverall_ratingOverall rating (0–10)start=0 end=10 step=1

Decimal step

typenamelabelparameters
rangeweight_kgWeight (kg)start=0 end=200 step=0.5

Using the value in a calculation

typenamelabelparameterscalculation
rangescoreTest score (0–100)start=0 end=100 step=5
calculategradeif(${score} >= 90, ‘A’, if(${score} >= 80, ‘B’, if(${score} >= 70, ‘C’, ‘F’)))
notegrade_noteYour grade is: ${grade}

Appearance

The range type renders as a slider by default. No additional appearance values are required for basic usage. You can combine it with horizontal for a wider layout on web forms:

typenamelabelparametersappearance
rangenpsHow likely are you to recommend us? (0–10)start=0 end=10 step=1horizontal

Best Practices

  1. Always set meaningful start, end, and step values — do not rely on defaults.
  2. Label the ends of your scale in the hint column (e.g., hint: 0 = Very dissatisfied, 10 = Very satisfied) to give respondents context.
  3. For 5-point Likert scales, use start=1 end=5 step=1 rather than 0–4, since respondents expect “1” to mean the lowest.
  4. Use range instead of integer + constraint when the bounded nature of the input is part of the question design (slider communicates the scale visually).

Limitations

  • The slider widget may not be ideal for very wide ranges (e.g., 0–10000) — a text integer with constraints is more user-friendly in those cases.
  • On mobile devices, fine step values (e.g., step=0.1) can be difficult to control precisely with a touch slider.
Was this page helpful?