The range question type lets respondents pick a number within a defined minimum and maximum. In rtSurvey's web form, this renders as a standard number input — the enumerator types a value directly. The start, end, and step parameters define the valid range and are enforced as constraints.
Basic XLSForm Specification
| type | name | label | parameters |
|---|---|---|---|
| range | satisfaction | How satisfied are you with the service? | start=1 end=5 step=1 |
The parameters column defines the slider bounds and step size:
| Parameter | Description | Default |
|---|---|---|
start | Minimum value (inclusive) | 0 |
end | Maximum value (inclusive) | 10 |
step | Increment between valid values | 1 |
For more details on the standard range question type, see the XLSForm specification (opens in a new tab).
Uses
Range questions are commonly used for:
- Satisfaction or rating scales (e.g., 1–5 or 0–10)
- Likert-style numeric scales
- Collecting measurements where only discrete values are valid
- Age brackets or score ranges where a slider improves usability over a text field
Example Usage
Basic rating scale
| type | name | label | parameters |
|---|---|---|---|
| range | overall_rating | Overall rating (0–10) | start=0 end=10 step=1 |
Decimal step
| type | name | label | parameters |
|---|---|---|---|
| range | weight_kg | Weight (kg) | start=0 end=200 step=0.5 |
Using the value in a calculation
| type | name | label | parameters | calculation |
|---|---|---|---|---|
| range | score | Test score (0–100) | start=0 end=100 step=5 | |
| calculate | grade | if(${score} >= 90, 'A', if(${score} >= 80, 'B', if(${score} >= 70, 'C', 'F'))) | ||
| note | grade_note | Your grade is: ${grade} |
Best Practices
- Always set meaningful
start,end, andstepvalues — do not rely on defaults. - Label the ends of your scale in the
hintcolumn (e.g.,hint: 0 = Very dissatisfied, 10 = Very satisfied) to give respondents context. - For 5-point Likert scales, use
start=1 end=5 step=1rather than 0–4, since respondents expect "1" to mean the lowest. - Use
rangeinstead ofinteger+ constraint when the bounded nature of the input is part of the question design (slider communicates the scale visually).
Limitations
- There is no slider widget in the rtSurvey web form — value entry is a plain number input. For a visual slider experience, use a mobile client that supports the range widget.
- For very wide ranges (e.g., 0–10000), a plain
integerwith a constraint is equally effective and more user-friendly. - Fine step values (e.g.,
step=0.1) work as constraints but have no slider precision concern in the web form.