Support

Account

Home Forums Backend Issues (wp-admin) Insert Fieldgroups in Tabs from other Fieldgroups

Solved

Insert Fieldgroups in Tabs from other Fieldgroups

  • Hi all. 🙂

    Ok i got the following situation:
    I have a Portfolio field group with the following tabs: ‘Thumbnails’, ‘Metas’, ‘Background’.

    I got another fieldgroup called ‘Content Editor’, which is pretty huge. (~50 fields).

    Here comes the Problem: I have multiple pages where i want that content editor included BUT i don’t want to show it beneath oder above the normal fieldgroups that appears on the selected pages.

    For example with the portfolio field group i want to integrate it within the existing tabs so it reads ‘Thumbnails’, ‘Metas’, ‘Background’, ‘Content Editor’.

    At the moment i do it this way with javascript:
    I create a tab with the name ‘content editor’ in the fieldgroup where i want my content editor and then i just insert the complete fieldgroup AFTER the field key of the tab. That works fine to be honest but is there a better solution? This one is a bit … 😉

    jQuery(‘#acf-content_editor’).insertAfter(‘.field_key-field_52af1e0e9d2d9’);

    Thanks in advance!! Hope you get the problem.

  • Hi @Michael1981

    Currently, there is no way to merge together field groups / tabs, so your jQuery solution is great. Clean, simple and effective!

    Hoep that helps

    Thanks
    E

  • Hi elliot,

    i thought you will punch me for this solution but if you think its simple and effective i will gladly stay with it, since it works great! 🙂 I think the only little downside is if the connection is slow you see the whole thing before it gots wrapped together but that affects the normal tabs too so its not a big deal.

    Thanks man!

    Michael

  • Hi @Michael1981. Feel free to try my very simple plugin for merging tabs. It uses javascript too, but it runs before ACF initialises the content, so all tabs appear together.

    https://wordpress.org/plugins/acf-merge-group-tabs/

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

The topic ‘Insert Fieldgroups in Tabs from other Fieldgroups’ is closed to new replies.