A Number field can be inserted in:

  • an Admin Page, as an option or a user_meta
  • a User Profile, as a user_meta
  • a Metabox, as a post_meta
Sukellos Admin Builder

The code below is used to generate this section in an Admin Page, for an option:

Copy to Clipboard

A Number inherit from a Field, and an Item, then all settings described in Field Settings and Item Settings are also used.

Specific settings for Number:

Number Settings Description
css
string / Default: ”
CSS rules to be used with this field. See tutorial on CSS.
placeholder
string / Default: ”
The placeholder label shown when the input field is blank
size
string / Default: ‘small’
Size of the slider, can be ‘small’, ‘medium’ or ‘large’
min
int / Default: 0
Minimum value, default 0
max
int / Default: 1000
Maximum value, default 1000
step
int / Default: 1
Step
unit
string / Default: ”
Unit, added after the slider for information