Number
A numeric input field with min, max, and step constraints.
Overview
The Number field renders an input[type=number] element that restricts input to numeric values. It supports integer and decimal values, configurable min/max bounds, and a step increment. Browser-native number spinners are shown.
For visual range selection (sliders), use the Range / Slider field instead. For calculated numeric values derived from other fields, use the Calculated Field.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
| id | string | — | Unique field identifier (UUID in the builder). |
| type | string | number | Must be "number". |
| label | string | — | Human-readable label shown above the field or step heading. |
| required | boolean | false | When true, the form cannot submit without a value. |
| isHidden | boolean | false | Hides the field from respondents (may still store defaults). |
| isDisabled | boolean | false | Renders the field read-only. |
| instruction | string | undefined | Help text shown below the label (not the same as placeholder). |
| placeholder | string | undefined | Ghost text inside the control when empty. |
| validation.min | number | undefined | Minimum length (text) or minimum numeric value (number) or digit count (phone). |
| validation.max | number | undefined | Maximum length, numeric bound, or digit count (phone). |
| validation.pattern | string | undefined | Regex the value must match. |
| validation.message | string | undefined | Custom error when validation fails. |
| conditionalRules | array | undefined | Show this field when any rule matches another field's value. |
| logic | object | undefined | Simple visibility: depends_on + show_if_value. |
| reporting | object | undefined | Admin submissions table: includeInTable, labelOverride, sortable, filterable. |
| integrationKey | string | undefined | Stable alias for external integrations instead of id. |
| analytics.metric_key | string | undefined | Optional analytics metric identifier (rating, range, number). |
| analytics.weight | number | 1.0 | Relative weight when aggregating scores. |
| validation.displayFormat | "auto" | "english" | "nepali" | "auto" | How numerals are displayed (locale-aware). |
JSON Schema
{
"type": "number",
"label": "Age",
"name": "age",
"required": true,
"placeholder": "Enter your age",
"validation": {
"min": 18,
"max": 120
},
"step": 1,
"allowDecimals": false
}Common Use Cases
- Age, quantity ordered, attendees, or years of experience
- Budget caps, percentages, or scores typed explicitly
- Dimensions, measurements, or inventory counts with min/max bounds
- Votes, ratings expressed as digits, or ID-style numeric codes
- Any strictly numeric answer where type validation beats free text