Color
The
Color type provides a simple color picker.
Settings
| Name | Type | Default | Required |
|---|---|---|---|
| string | '' | ||
| boolean | false | ||
| boolean | true | ||
| boolean | false | ||
| array |
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.
searchable
-
- Type
- boolean
- Default
- true
If set to false, the field will not be considered in backend search.
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: - label: 'Red' value: #FF0000 - label: 'Green' value: #008000 - label: 'Blue' value: #0000FFCopied!
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:
- label: 'Red'
value: #FF0000
- label: 'Green'
value: #008000
- label: 'Blue'
value: #0000FF
Copied!