Home Forums Add-ons Flexible Content Field Hide Fields From Specific Flexible Content Layout?


Hide Fields From Specific Flexible Content Layout?

  • We have a set of Flexible Content Blocks that we use often, and we’ve added a “Display Options” tab to each of them with various options – font color, animation, background options, etc.

    The content in the Display Options tab on all of the Layouts is a clone field of a standalone Display Options field group. That way, if we ever need to change the Display Options we only need to do it once and they’ll carry over to all of our blocks.

    For one specific layout, we don’t want to display Background Options in the Display Options tab.

    Is there a way to filter the fields out of a specific Layout? I haven’t had any luck so far. Using prepare_field and load_field filters, I don’t seem to have access to find the parent Layout name and filter the output.

    We could always just add some JS to remove the fields by targeting the parent layout type class, but this feels hacky and I’d love to find a way to actually use ACF’s filters to do this if at all possible.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.