Number Decimal
A question of type decimal allows the user to enter a number with a required number of decimals. This can either be a negative or positive number with a minimal required number of decimals, depending on the supplied question options.
{
"id": 14,
"key": "decimal",
"label": "Decimal number",
"description": "A numeric question with at least 2 decimals",
"required": true,
"type": "decimal",
"answers": [
{
"id": 0,
"label": null,
"nextQuestionId": 79,
"options": {
"decimals": 4,
"minValue": -10.0,
"decimalsRequired": 2
}
}
]
}
Answer Options
This chapter describes the option possibilities for an answer.
Name | Type | Description | Required | Default |
|---|---|---|---|---|
minValue | double | The minimum value the answer should be | false | 0 |
maxValue | double | The maximum value the answer can be | false | 0 |
minLength | int | The minimum length the answer should be | false | 0 |
maxLength | int | The maximum length the answer can be | false | 0 |
decimals | int | The number of allowed decimals | false | 0 |
decimalsRequired | int | The number of required decimals. | false | 0 |
Examples
Example with a configured minValue and decimalsRequired
Last modified: 04 June 2025
