List Field Type
Additional attributes, defaults, and usage example for list fields.
Usage Example
Here is an example that shows a list of tags
on a page:
1
2
3
4
5
6
7
8
9
10
By default, these will be a series of string fields that you can add, remove, and reorder.
Configuring List Items
Unless you want an array of string
values, you'll have to set the items
property.
Simple List Types
For simple fields, specifying the type is enough.
1
2
3
4
5
6
7
8
9
10
This will render a list of images.
The simple types include all models other than those mentioned in the advanced types section.
Advanced List Types
Some types require additional properties.
Adding a Static Label
Notice that the label is filled in by default for each item. You can control this with a label
property, just like any other field.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Now the label will appear statically next to each image.
Control Types
By default, the control type is inherited from the type
attribute set on the items
object. However, some types allow for additional control types.
controlType
field should be placed on the primary field definition, not within the items
object.
checkbox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
These options are rendered as checkboxes, rather than individual controls.