Configure the Number Field

The Number field allows content writers to add a numeric entry. You can set maximum and minimum values if needed.


The Number field allows editors to enter a number.

Screenshot of the Number field in the drag-and-drop editor.

The visual builder

When configuring a Number field, you'll see the options to set the Field name, API ID, and Field placeholder.

Screenshot of the Number field editor.

JSON model

The following table displays the JSON configuration options available in the JSON editor.

type

string (required)

Value must be Number

config

object

Object for the configuration options

config.placeholder

string

A user-friendly placeholder for the field in the entry editor

config.label

string

The label that shows up for the field in the document editor

config.min

integer

The minimum allowable value for the number

config.max

integer

The maximum allowable value for the number

min and max can only be configured in the JSON editor.

Example JSON configuration

The following JSON defines a Number field with minimum and maximum values:

Copy
"example_number": {
  "type": "Number",
  "config": {
    "label": "Number",
    "min": 10,
    "max": 20
  }
}

API response example

Here is an API response example of a Number field with the API ID of example_number:

Copy
// API response example of a Number field

{
  //...
  "example_number": 12
}

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.