Range Fields

Range fields give you a range input (opens new window) that allows authors to set a number using a visual slider or a number input.

Screenshot of a range field interface in the Craft control panel

# Settings

my-craft-project.ddev.site/admin/settings/fields/new
Range field settings screen in the Craft control panel
Adding a new range field via the control panel.

Range fields have the following settings:

  • Min Value — The lowest number that may be accessed using the slider or entered manually.
  • Max Value — The highest number that may be accessed using the slider or entered manually.
  • Step Size — The permitted granularity, mapped to the step (opens new window) attribute of the resulting range and number inputs.
  • Default Value — An initial value for the input, on new elements.
  • Suffix Text — A string to include after the number input.

# Development

Working with range field values is identical to number fields.