A structure is a collection of unique fields and field groups. Fields contain information about themselves, for example what type of field they are and any associated metadata, but no content in themselves (content is held in the item).
A structure consists of:
- a unique identifier (
uuid
) - zero or more
groups
.
Each group has
- it's own unique identifier (
uuid
) - an author-friendly
name
- and zero or more
fields
.
A field has
- a
uuid
- a
field_type
(one oftext
,attachment
,guidelines
,choice_radio
,choice_checkbox
) - an author friendly
label
- as well as an optional
instructions
field, which may contain helpful instructions to the content author/editor as to how to fill a certain field. metadata
- used to control specific settings based on thefield_type
. For exampleis_plain: bool
- on text fields will change the field type to a text field (default is rich text field)validation
- may set a maximum word/character limit on a field. e.g.:validation: { rule: 'word', limit: 150 }
(Note that limits are soft limits - the content editor may exceed the value but the UI will display a warning. We believe this provides a better authoring experience)choice_fields
- only applies tochoice_radio
andchoice_checkbox
field types. May contain an array ofoptions
, where each option contains anoptionId
and alabel
. May also contain anotherOption
which will allow content authors to enter a custom value (in the item) i.e. select an option not pre-defined in theoptions
list.