Skip to content
Join our Slack

Number

Type key: number_input. Renders a field that accepts only a number. In the editor this is the Number block.

A question: the question rules apply, and it can sit in a layout row column.

The meta fields of this node type are listed in the request body of Replace the draft document, under pages › nodes, in the number_input tab.

A minimal Number node
{
"public_id": "nGst",
"sort_order": 1,
"type": "number_input",
"meta": {
"question": "<span>Number of guests</span>",
"placeholder": "0",
"validation": {
"required": true
}
}
}
  • default_value is a number, not a string.
  • number_style is classic (a plain field) or stepper (a field with buttons). number_button_icon picks the stepper icons: chevrons or plus_minus. null keeps the editor default for both.
  • number_minmax sets the accepted range. null accepts any number.
  • number_step is the stepper increment; null steps by 1. With number_whole_only on, a fractional step is refused on write with 400 INVALID_INPUT at meta/number_step.
  • Settings that cannot all hold, such as min greater than max or a default_value outside the range, are accepted on write and reported at publish as FORM_PUBLISH_NUMBER_SETTINGS_INVALID.

Your next form could be the best-looking thing on your site.

Free forever. Unlimited responses. No signup to start.