Is it possible to customize entry titles for clonable sub-group?

Support MB Group Is it possible to customize entry titles for clonable sub-group?Resolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33990
    indatext.comindatext.com
    Participant

    I have a field with a subgroup, which is clonable to produce product variations. Every clone adds "Entry N" in a post UI field. Is there a way to name these accordion titles from some text field in that sub-group, instead of Entry 1, Entry 2 ... Entry N? For a large number of product variations that would be very handy.

    #34001
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can follow this documentation to set the title for the collapsible group https://docs.metabox.io/extensions/meta-box-group/#collapsible-groups

    #34007
    indatext.comindatext.com
    Participant

    Thank you for pointing me there. If I have a group defined from UI, can I add filter for sub-group titles only using PHP function, or I have to delete group created from UI and then re-define the whole array programmatically?

    #34026
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The builder does not support fully customizing. You need to use the PHP code to register the field type group to use another field value in group title like this

    'group_title' => 'Static text {#} {sub_field_1} {sub_field_2}',
    
    #34039
    indatext.comindatext.com
    Participant

    Thank you. I actually figured out how to make it work from UI. since its a key-value pair, it can be entered in sub-group custom values UI in Advanced settings, and it worked. Wonderful.

    #39016
    ShemzoneShemzone
    Participant

    Hi @indatext.com
    I'm interested to know how did you managed your custom values from the UI. Could explain me please?

    #39017
    ShemzoneShemzone
    Participant

    Sorry, I found it: Group settings > Advanced > Group title

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.