Field Group (not repeatable)

Hi all,

SliceMachine and Dashboard have a non documented (but not hidden) feature for creating a “Set of fields“, which is something that helps a lot for giving a client a well sorted UI for creating content.

These kind of fields are created by adding a “Repeatable Group“ inside “Set of fields“ field category. Then you have to un check the “Repeatable“ boolean. The problem here is explained by itself, a non-repeatable group called “Repeatable Group“.

My suggestion is to split these features into 2 options inside “Set of fields“:

  • Repeatable Group ({ type: “Group”, repeat: true })
  • Single Group ({ type: “Group”, repeat: false })

So natural and it’s already implemented in the JSON model.

There would be additional changes in the Prismic Dashboard UI for “Single Group“, since they can have only 1 item in the array:

  • Remove “Add item” button for the initial case, and display all fields by default for the first and single item
  • Remove length from the Field name
  • Remove Item bar with item title and its index

If we join these changes with the Nested groups “hidden“ feature, Prismic becomes x10 easier for content modeling and clients experience.

I can show you a currently working example of this (without the UI changes of course):

I hope you like this. Thanks in advance!

Hey, thanks for the detailed write-up!

You're right. There's currently no way to create a non-repeatable group in the UI.

The split you're suggesting between Repeatable Group and Single Group, along with the UI adaptations, is interesting. We'll take a closer look at this.

Appreciate you taking the time to lay it out so clearly.

One thing worth clarifying on the nested groups side: this was an early experiment on our end, but it's not officially supported, and we don't plan to take it further for now.

1 Like