Number Field
Collect or store numeric values such as quantities or reference numbers. Learn how to create a number field with limits and validation.
A number custom field can be used for both Baskets and Option Sets. For Baskets, it appears as an input field where customers can provide additional information, such as a phone number, quantity needed or order reference number. For Option Sets, this field is visible in the admin panel within the Option Set. You can later use this information as a dynamic value in different areas, such as SKU codes or Price Codes.
Create a number field
Fill in the field details
Provide the remaining required information. For example, the regular expression ^\+?\d{1,3}[-.\s]?\d{3,14}$ validates European phone numbers with an optional country code and supports basic separators like dashes, dots or spaces.
1
Name
The name for the number custom field. Required.
2
ID
Automatically generated ID from the name in a URL-friendly format. Required.
3
Field Scope
Basket or Option Set. Required.
4
Type
Number. Required.
5
Regex Regular Expression
A pattern used to validate the format of text entered by the user (see the example above). Optional.
6
Description
A description of the custom field, which can be used to provide additional details for your customer. Optional.
7
Min Value
Specifies the minimum numeric value allowed for the field. Optional.
8
Max Value
Specifies the maximum numeric value allowed for the field. Optional.
9
Decimal Value
Specifies the maximum number of decimal places allowed in the input field for more precise values. Optional.
10
Required Setting
Defines whether the input is required or not.

Option Set settings
For number custom fields created for an Option Set, two additional settings are available:
11
Custom field must be unique
Controls whether the data entered must be unique for each entry, preventing duplicate values.
12
Exposed to Embed
Enabled by default to allow the custom field to be used in embeds.

How it appears in the Basket
Once you've created a number custom field and added it to the Basket form, it appears as a numeric input field for customers submitting their Baskets.

Related articles
Was this helpful?