Home Forums Gutenberg Hide fields depending on block styles Reply To: Hide fields depending on block styles

  • Alright, I got an OCD moment because I come back to this post every 6 months checking in if it’s been done so I wanted to give it a go.

    I’m 99% there with only filters:

    With that, it works on full reload of the page in the admin, but not with changes, style changes or AJAX re-rendering… And you have to visit a Gutenberg page to activate the block styles cache, otherwise there’s no way WordPress knows about the block styles registered (🙄).

    Other than that small limitation, only thing that I miss is the ability to force the re-rendering of the ACF form components. As far as I know, my AJAX works and the filtering out of the field group works, but the forms don’t re-render or reload according to changes in the form. Might have to add filters in acf-pro-blocks.js? Maybe we can already do that with JS filters / force JavaScript events?