Number
The
Number only allows integers or decimals as input values.
Settings
| Name | Type | Default | Required |
|---|---|---|---|
| string | 'integer' | ||
| integer | "0" | ||
| array | |||
| boolean | false | ||
| array | |||
| boolean | |||
| boolean | false | ||
| object | |||
| object | |||
| object | |||
| string | |||
| boolean | false | ||
| string | |||
| boolean | false | ||
| integer | 30 | ||
| object |
format
-
- Type
- string
- Default
- 'integer'
Possible values:
integer(default) ordecimal.
default
-
- Type
- integer
- Default
- "0"
Default value set if a new record is created.
range
-
- Type
- array
An array which defines an integer range within the value must be.
- lower (integer)
- Defines the lower integer value.
- upper (integer)
- Defines the upper integer value.
Example:
range: lower: 10 upper: 999Copied!
required
-
- Type
- boolean
- Default
- false
If set, the field becomes mandatory.
slider
-
- Type
- array
Render a value slider next to the field. Available keys:
- step (integer / float)
- Set the step size the slider will use. For floating point values this can itself be a floating point value. Default: 1.
- width (integer, pixels)
- Define the width of the slider. Default: 100.
Example:
slider: step: 1 width: 100Copied!Tip
It is advised to also define a range property when using the slider, otherwise the slider will go from 0 to 10000.
autocomplete
-
- Type
- boolean
Enables or disables browser autocomplete for the field.
behaviour.allowLanguageSynchronization
-
- Type
- boolean
- Default
- false
Allows to select if localization uses custom or default language value.
fieldControl
-
- Type
- object
See TCA fieldControl.
fieldInformation
-
- Type
- object
See TCA fieldInformation.
fieldWizard
-
- Type
- object
See TCA fieldWizard.
mode
-
- Type
- string
When set to
use, a checkbox appears above the field allowing the user to override the placeholder value.Or Override Placeholder
nullable
-
- Type
- boolean
- Default
- false
Allows the database field to store a
NULLvalue.
placeholder
-
- Type
- string
Placeholder text displayed inside the field when it is empty.
readOnly
-
- Type
- boolean
- Default
- false
Renders the field in a way that the user can see the value but cannot edit it.
size
-
- Type
- integer
- Default
- 30
Abstract width of the input field. Minimum
10, maximum50.
valuePicker
-
- Type
- object
Renders a select box next to the field from which predefined values can be inserted. Requires an
itemsarray of objects withlabelandvaluekeys.Example:
valuePicker: items: - label: '100' value: 100 - label: '250' value: 250 - label: '500' value: 500Copied!
Examples
Minimal
name: example/number
fields:
- identifier: number
type: Number
Advanced / use case
name: example/number
fields:
- identifier: number
type: Number
format: integer
default: 10
size: 20
range:
lower: 10
upper: 999
slider:
step: 1
width: 100
valuePicker:
items:
- label: '100'
value: 100
- label: '250'
value: 250
- label: '500'
value: 500