Field Group Field

Illustrated drawing of Amadeus Maxmimilian StadlerIllustrated drawing of Amadeus Maxmimilian Stadler

Amadeus Stadler

Last updated August 25, 2021

The Field Group field allows to group multiple other fields under a common key, which is ideal for objects in your data structure. If you would like to group fields only on a visual level, but not in the data structure, you may be looking for a Container field instead.

Editing UI Widget

This field is displayed as a large button labelled with the field’s label and a preview value determined automatically or by the value of the field’s displayField.

Output Format

The Field Group field outputs the text as an object in which each key corresponds to the key of one of its sub-fields, which are stored as an array in this field’s value property.

Options

This field has no available options at the moment.

Validation

Since the content of this field is determined by its sub-fields, it cannot be validated itself. Use the validation options of the sub-fields instead.

Notes

The Field Group field is for grouping fields under a common key, in a way creating a sub-schema within a Schema. This means it’s not an arbitrary way to group content visually, since the fields within a Field Group will be available only under de Field Group field’s key. For grouping fields only on a purely visual level the Container field exists, which has no impact on the data structure.

If you find yourself adding a Field Group field as the only field in a tab, you can likely achieve the same goal by enabling that tab’s groupAs property and adding all the fields in the Group field as top-level fields instead.

The value of the field with the key matching what is set in the field’s displayField value will be used to preview the group’s contents while it’s collapsed in the editor. This value will be converted to a string and stripped of any Markdown or HTML formatting symbols for a better legibility. In the event that the value is an array, its values will be joined into a comma-separated list.

If no displayField is set for the Group Field, Mattrbld tries to find a preview value automatically, but may fail to do so, causing only the label of the group to be displayed.

Version History

  • Version at launch: 1