Browse all documentation

Group field

Model one nested object with child fields, generated types, and dotted query paths.

Use field.Group for one object with a known shape: SEO metadata, an address, dimensions, or a reusable cluster of settings. Children become a nested type in generated Go and TypeScript contracts.

In the admin

An expanded Search preview group in the Ridu admin with populated SEO title and description fields.

Grouped controls become one nested object, with child paths such as seo.title.

Smallest working example

content/posts.go
field.Group(
  "seo",
  field.Fields(
    field.Text("title", field.MaxLength(60)),
    field.Textarea("description", field.MaxLength(160)),
  ),
)
document.json
{
  "seo": {
    "title": "A concise search title",
    "description": "A concise search description."
  }
}

At least one child field is required. Child names must be unique within the group and form canonical paths such as seo.title and seo.description.

Validation, queries, and localization

Group supports Required, Localized, conditions, and common presentation options. Each child keeps its own validation, access, hooks, and admin metadata. Query nested stored children with their dotted path; the generated SDK exposes those canonical keys in its where contract. The group container also supports an exists filter.

Localize individual children when only those values vary. Put Localized on the Group when the entire object varies as one locale value. A localized container falls back as a container instead of mixing child values from different locale objects.

Common mistakes

  • Use Array when there can be several objects and Blocks when rows have different shapes.
  • A Group changes the API path. Use Row or Collapsible to organise controls without adding an object wrapper.
  • Renaming the group or a child is a stored-data and API migration.

See field.Group and field.Fields.