Section
type: Section
Sections are like Collections for FlexForm. The difference is, that you can't reference foreign types. Instead you define anonymous structures, which are only available for this specific FlexForm field.
A Section requires you to define at least one Container
, which holds
the available fields. You can have multiple Containers with different fields. If
you define more than one Container, the editing interface will display multiple
buttons to choose from.
Settings
identifier
-
- Type
- string
- Required
true
A unique identifier
label
-
- Type
- string
Define a label. If not defined,
identifier
is used as fallback.
container
-
- Type
- array
- Required
true
Define one or more Containers with fields.
- identifier
- A unique identifier
- label
- Define a label. If not defined,
identifier
is used as fallback. - fields
- Define available fields. These field types are prohibited:
Flex
,Form File
,Collection
.
Example:
- identifier: pi_flexform
useExistingField: true
fields:
- identifier: section1
type: Section
label: Section 1
container:
- identifier: container1
label: Container 1
fields:
- identifier: container_field
type: Text
label: Container field
- identifier: container2
label: Container 2
fields:
- identifier: container_field2
type: Textarea
label: Container field 2
Labels
XLF translation keys for Sections and Containers have the following convention:
<body>
<trans-unit id="FIELD_IDENTIFIER.sections.SECTION_IDENTIFIER.title">
<source>Label for Section</source>
</trans-unit>
<trans-unit id="FIELD_IDENTIFIER.sections.SECTION_IDENTIFIER.container.CONTAINER_IDENTIFIER.title">
<source>Label for Container</source>
</trans-unit>
<trans-unit id="FIELD_IDENTIFIER.sections.SECTION_IDENTIFIER.container.CONTAINER_IDENTIFIER.FIELD_IDENTIFIER.label">
<source>Label for field in Container</source>
</trans-unit>
</body>