Hi there,
Is it possible to add multiple field groups to a block?
Good use case for this where you might have a common config questions for each block – examples below
Instead of creating a new field in each block/field group, it would be great to have the option to include one common field group in all blocks?
I gave it a go, but it seems to output only one field group. Is there anyway to achieve this, or another approach?
I also seem to be having this exact issue!
I’ve got a ‘global’ Field Group which outputs a series of general Block config options (width/margin settings) to all Blocks and then Block-specific Field Groups, however when both the ‘global’ Field Group is active and the Block-specific Field Group, only the ‘global’ one appears in the Gutenberg Editor, not the Block-specific content. Disabling the ‘global’ Field Group makes the Block-specific fields appear as usual.
That is a very valid need. I have it myself. At the moment, based on observation and testing, it seems that multiple field groups can be assigned to blocks, but all the fields from all the field groups will appear in the same place, ie either in the content or the sidebar.
Perhaps the best way to assign the same field group to many blocks is by cloning the field group into the block’s fields. My need was to separate fields of content with fields that work like attributes to the content and have the first ones inside the content of the block editor and the latter ones in the sidebar.
Has anyone tried using cloned fields in a block field group? Create your global field group and then clone it into the block specific field group instead of trying to include 2 field groups.
I have used cloned fields in block field groups. Simple stuff for the time being, but so far they work as expected.
The topic ‘Multiple Field Groups in a Block?’ is closed to new replies.
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 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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.