Home › Forums › Feature Requests › Need a better way to organize fields! › Reply To: Need a better way to organize fields!
The image here uses a random glyph icon set, AmandaB’s field layout and a Bootstrap popover. This is by no means the best solution, it’s just an idea!
Visualization suggestion: when fields are hovered on, a small arrow icon might appear in the corner. On clicking this icon, a menu could be displayed with field-specific layout options.
After the “Expand Field” or “Contract Field” link is clicked, the field wrapper could have its column width class adjusted to the next closest division – if we were using a 12-col class-based grid system, a field with
class="field six columns" might instead become
class="field col6 columns"… this would allow for JS string split and integer manipulation, which is a bit less tedious 🙂
Clearly this is only display-side, I imagine that admins would like the ability to specify layout options like this from the field edit page at
/wp-admin/edit.php?post_type=acf as well.
Data submission could either be AJAX on popover link click, or it could be submitted on post update like normal – the latter may be better in case users change layout and decide to refresh the page in order to revert changes.
I suppose this means adding more data for each field – ACF will need to keep track of each field’s layout settings behind the scenes. I’m not sure where exactly this data should be placed however… it’s not particularly useful in the theme-side
get_field() calls, so in the interest of efficiency it might be better to only have this info available in the administration pages.
The downside of the display-side layout adjustment is that it will need to be role-restricted. We won’t want everybody to be changing field layouts on a whim! I’m not sure what capability level is required to add/edit ACF fields, but I would assume that it’s
manage_options – the same capability level could be used to determine whether a user has the ability to adjust field layout on the fly.
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!
We’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.