score:1

Accepted answer

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:

  1. Add a validator of type "numeric" with minimum value of 0 and a maximum of 100.
  2. Set the input type to "number" and set its min and max values to 0 and 100 respectively.

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"
    }
   ]
  }
 ]
}

Related Query

More Query from same tag