Color
The Color
type provides a simple color picker.
Settings
default
-
- Type
- string
- Default
- ''
Default value set if a new record is created.
required
-
- Type
- boolean
- Default
- false
If set, the field will become mandatory.
opacity
-
- Type
- boolean
- Default
- false
Enables selection of opacity for the color.
valuePicker
-
- Type
- array
Renders a select box with static values next to the input field. When a value is selected in the box, the value is transferred to the field. Keys:
- items (array)
- An array with selectable items. Each item is an array with the first being the label in the select drop-down (LLL reference possible), and the second being the value transferred to the input field.
Example:
valuePicker: items: - [ 'Red', '#FF0000' ] - [ 'Green', '#008000' ] - [ 'Blue', '#0000FF' ]
Copied!
Example
Minimal
name: example/color
fields:
- identifier: color
type: Color
Copied!
Advanced / use case
name: example/color
fields:
- identifier: color
type: Color
autocomplete: true
default: '#0000FF'
valuePicker:
items:
- [ 'Red', '#FF0000' ]
- [ 'Green', '#008000' ]
- [ 'Blue', '#0000FF' ]
Copied!