Support hidden repeater sub-fields #1586
dennisklappe
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Allow repeater sub-fields to be marked
hidden: true: kept in the entry data, but not rendered in the content editor.Use case
A common pattern is storing editable site copy as
{ label, value, key }rows, where a template looks each text up by a stablekey. Today every sub-field is rendered and editable, so editors see the rawkeynext to the text. Exposing it is clutter and a footgun, since renaming it silently breaks the lookup. There is no way to keep the key in the data while hiding it from editors.Proposal
Add an optional
hidden?: booleanto repeater sub-fields. A hidden sub-field is not rendered, and its value is preserved on save (item updates already spread existing fields, so the round-trip is safe).Implementation
RepeaterFieldskips hidden sub-fields, tests, changeset).Userland plugin (works today)
While the core change is reviewed, I built a small field-widget plugin that solves the same problem in userland by rendering a
jsonfield as clean labeled text boxes and keeping the other keys untouched:It works, but a native
hiddenflag would be the cleaner primitive and would apply to any repeater, not just a copy list. Opening this to get maintainer feedback on the approach before the PR lands.Beta Was this translation helpful? Give feedback.
All reactions