Support

Account

Home Forums Feature Requests A container field similar to a Group but is only for layout

Solving

A container field similar to a Group but is only for layout

  • It would be very useful to have a field similar to a Group field, but that doesn’t have a name and wouldn’t have any borders or design other than the optional Label field. Since there’s no name field you don’t have to prefix the sub fields using the Group’s name. This way you could set its width (to 50% for example) so you could organize the layout of multiple fields. The Group field can kind of do this, but then you have the border and padding, and you have to refer to the fields using the Group field’s name as the prefix.

    • ksksks

    • July 30, 2020 at 4:23 am

    Yes, this would be great!

    • gavin310

    • September 17, 2020 at 10:13 pm

    Hopefully ACF will consider adding this feature, but in the meantime this is what I’m using. Just include this CSS in your admin area and add the no-style class to your Group field.

    .acf-field-group.no-style {
    	padding: 0 !important;
    }
    .acf-field-group.no-style > .acf-label {
    	display: none !important; /* If you want the Group's label to show, remove this style */
    }
    .acf-field-group.no-style > .acf-input > .acf-fields.-border {
    	border: 0 !important;
    }
    • ksksks

    • September 17, 2020 at 10:37 pm

    Thank you for the hint.
    But I think the big thing, or at least what I need, is a group field without grouping the values in the resulting array.

    I need an ACF “container” that is used for backend layout only. Without nesting the subfield’s variables in the resulting data array for the frontend.
    The group field would be fine for me if it wouldn’t put its subfields values in an extra array.

    • gavin310

    • September 17, 2020 at 10:40 pm

    Yep, I didn’t mean to take away from the original intent of the feature request. The two big things are definitely not having to access the fields via array, and then the styling. For now I’m stuck using the ACF Columns plugin, which is a great “hack”, but something native to ACF would make so much more sense.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.