Number
- Name:
number - UI: HTML number input
- Data type:
stringornumber. Configured byvalue_typeoption
The number widget uses an HTML number input, saving the value as a string, integer, or floating point number.
Widget options
For common options, see Common widget options.
| Name | Type | Default | Description |
|---|---|---|---|
| default | string | number | '' | Optional. The default value for the field. Accepts a string or number |
| value_type | 'int' | 'float' | string | 'string' | Optional. Accepts int or float; any other value results in saving as a string |
| min | number | Optional. Minimum value accepted | |
| max | number | Optional. Maximum value accepted | |
| step | number | 1 | Optional. Size of steps when stepping up or down in input |
Example
name: 'puppies'
label: 'Puppy Count'
widget: 'number'
default: 2
value_type: 'int'
min: 1
max: 101
step: 2