first, thanks for your amazing work!
I’m here to make a functionality/improvements suggestion related to something that happens frequently in my work using ACF (and other users).
Sometimes I have the need to create custom fields that will receive only small text information. And what we normally do is to create one or more text fields, and so on, resulting in a metabox with the various field lines.
In many cases, I prefer to group certain fields, making better use of horizontal space. For this, I end up using a resource that are provided by the ‘repeater field’ add-on: the table layout. So I define the minimum and maximum number of rows in 1, to prevent that the end user create new rows. I often go beyond the text fields, and use taxonomy fields, checkbox, or anything else.
The result is something that you already saw in others users posts, but I have another examples, just to illustrate..
I know that this is a recurrent feature request, but I think that we could use this new discussion to analyze the viabilities to make something easy and pratical.
My suggestion is to create a new field type: the ‘group field’ (something like the ‘tab field’ functionality, grouping all fields below it), where we could set the amount of columns for the group layout.
I don’t know how this field could work, but here is one simple idea:
this functionality could just add a wrapper-div for the fields below them (until a new group be defined), and each ‘in-field’ receives a inherit css propriety, based on the number of columns set for the group.
E.g.: If we set 3 columns for the group, the ‘in-fields’ could float left, each one with 33% (or a little less, based in one css template) of width. If we have 3 ‘in-fields’, they will be placed in one line. If we have 6 fields, 2 line … And we could also place groups inside groups..
If we don’t want more custom layout groups, just create a new one (to close the previous one) and keep the other fields as we already do.
Thanks for your time!
That said, it would be very complicated to do this with sub fields due to the complicated table layout…
A good suggestion though, so thanks
My two cents:
We can already group fields using the repeater field as a container. And by setting minimum and maximum rows both to 1 the Add Row doesn’t even show.
But it’s a hack because we are forcing our data structure to be unnecessarily nested. A group layout field would be handy.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2019 Advanced Custom Fields. Subscribe