Skip to content Skip to footer navigation
You are reading the docs for an old version of Statamic. Consider upgrading to Statamic 6.

Group Fieldtype

Organize the data by visually grouping related fields and assigning a distinct key to each group for clearer data structuring.

Screenshot of Group
The Group Fieldtype in action!

Overview#

A group fieldtype is a simple container that holds additional fields you would like grouped visually as well as under a parent key.

Data Storage#

In the screenshot above, the data structure for these fields will be as follows:

location:
address: 123 Main Street
city: Schenectady
zip: 12345

Templating#

All fields inside a Group will be scoped under their parent key like so:

{{ location:address }}, {{ location:city }}, {{ location:zip }}
{{ $location['address'] }}, {{ $location['city'] }}, {{ $location['zip'] }}

will output

123 Main Street, Schenectady, 1234