Group Fields in Dynamic Form Layouts
When creating or editing a layout for a dynamic form, you can group the form's fields so that they are displayed together as a single entity in the layout. You can configure a group so that it's hidden or visible, or collapsed or expanded when rendered on the page.
For example, you might create an address group that contains the name, address, city, state, country, and postal code fields. You can then apply conditions to the group that control when the group is displayed. A group also makes it easy to add several fields to a different layout in one step, rather than adding them individually.
You can define properties for a group (for example, a group label, or if the group is rendered as collapsed) and for individual fields in a group (for example, to specify column spans for fields to create complex dynamic form layouts).
To group fields in a dynamic form layout:
After a group is created, you can still use the handles for fields to drag them into and out of a group.
Note:
If you want to use a translation bundle for a string you enter in the Label property, you currently need to manually enter the translation expression in the Label field in the Properties pane, and edit the layout's json
file (layout.json
) to add the import element for its translation bundle. For example, if the label was Address Group, and the name of the translation bundle was test_bundle
, you would add [[$dynLayout.translations.test_bundle.AddressGroup()]]
in the Label field:
You would also need to manually add the import for the translation bundle to the json
file (in this example, test_bundle
):
"imports": {
"translations": {
"self": [
"test_bundle"
]
}
}
For details, see Work With Translations.