Home Forums Gutenberg Multiple Field Groups in a Block?


Multiple Field Groups in a Block?

  • 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

    • Background Colour
    • Container Width

    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.

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

The topic ‘Multiple Field Groups in a Block?’ is closed to new replies.