Am using ReactJS with surveyjs, I want to use an input element for a percentage value (%). I wonder if there is a way of doing this:
- Using bootsrap addon or something like that with surveyjs inputs.
- Limit input value between 0 and 100.
Thank you.
Am using ReactJS with surveyjs, I want to use an input element for a percentage value (%). I wonder if there is a way of doing this:
Thank you.
You could configure a question of type "text" to accept only numbers between 0 and 100. There are two options on the question that need to be set:
The resulting JSON should look like this:
{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "Enter percentage (0-100)",
"validators": [
{
"type": "numeric",
"minValue": 0,
"maxValue": 100
}
],
"inputType": "number",
"min": "0",
"max": "100"
}
]
}
]
}