Skip to content
  1. Extras
  2. PageBuilder
  3. Field types
  4. Free
  5. number

Field number

Version: Free.

Why this type

Number input in the inspector, not a digit string. Pro: responsive across breakpoints. Easy to sort and compute in the chunk.

When to use

  • Item limit, discount percent, year
  • Stat value next to a label field
  • Order or weight when a select list is overkill

Tips

Money and currency format belong in currency (Pro). Phone or SKU with mask use imask (Pro).

Similar types

  • currency for amounts with currency symbol
  • select for a fixed set of numbers

Schema

json
{
  "name": "count",
  "type": "number",
  "label": "Count",
  "min": 0,
  "max": 100,
  "allowDecimals": false,
  "default": 0,
  "tab": "Content",
  "width": 100,
  "active": true
}

Value

Number or null.

Section data

Key count in the section data (number or null):

json
{
  "count": 12
}

Chunk example

fenom
{if $count !== null}<span class="count">{$count}</span>{/if}

Notes

Limits: min, max, minValue, maxValue, allowDecimals. Pro: responsive.

Common properties

For fields with name that are stored in the section data:

KeyTypeRoleCMP
tabstringGroup subtitle in the inspectoryes
width25–100Field width as % of the row (flex)yes
descriptionstringHint under the labelyes
defaultanyInitial value for a new sectionyes
activeboolfalse hides the field in the inspectoryes
requiredboolRequired on publish (draft still saves)yes

Pro (capability responsive): with responsive: true, the section data uses desktop, tablet, mobile keys instead of a scalar.

See fields overview.

See also