Home Forums Add-ons Flexible Content Field Add custom label field to FC row that also appears in row handle?


Add custom label field to FC row that also appears in row handle?

  • Hi, I’m newly messing around with the Flexible Content field to build a rudimentary ‘page builder’ setup for a client’s WordPress website and applies to their Pages and posts.

    At the moment, the only thing which makes using this FC field as a Page Builder slightly inconvenient is that the Rows of the content field, when they are collapsed, only show the Label they are given in the ACF FC Layout setup in the ‘Layout Row Handle’ bar.

    For example, if I set up an FC Layout called “Three Equal Columns (contained)”, on the WordPress editing side, all FC rows that use this layout are labelled that.

    Like this (imagine + – v are the row controls):

    Full column (contained) + – v
    Three Equal Columns (contained) + – v
    Banner Image w/Text (full-width) + – v

    But it would be even more useful if on a per-row basis, a custom ‘label’ text field could be placed in each row, and the end user could fill it in to apply a custom label field (that could appear beside the layout Label) in the FC Layout Row Handle. So that when collapsed, the FC Rows’ Handles would look like this:

    Regional NewsFull column (contained) + – v
    Staff ListingsThree Equal Columns (contained) + – v
    Upcoming Conference BannerBanner Image w/Text (full-width) + – v

    The Repeater field does something like this already – give you an option for what field appears when a Repeater Row is collapsed.

    So I imagine… it wouldn’t be too difficult to create or even filter some function to do this for FC Row Handles?

    Has anyone done written / filtered such a function already?

    Or taken a stab and has some code to tweak?

    Or has an idea where one would begin?

    Cheers & thanks,

    Rob (oxygensmith)

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

You must be logged in to reply to this topic.