Custom Fields
Re-Envisioned
Support Meta Box Group Group not working properly

This topic contains 18 replies, has 6 voices, and was last updated by  Matthias Nettekoven 1 week, 5 days ago.

  • Creator
    Topic
  • #13137
    Resolved
    Dragan
    Participant

    I created a group using MB Builder and set it to:

    • collapsible true
    • default_state collapsed

    and added some fields with default values and conditional logic.
    NOTE: my fields work perfectly when not in group

    The result is:

    • The group is not collapsed
    • There is no visual indication that there is a group at all
    • The fields are just displayed as if they are not in a group
    • Default values of fields are not set (aka lost)

    Is there a bug or limitations with the group extension?

    the code:

    https://ghostbin.com/paste/tq88y

Viewing 10 replies - 1 through 10 (of 18 total)
  • Author
    Replies
  • #13159

    Anh Tran
    Keymaster

    Hi Dragan,

    I’ve just checked your code and the functionality works. However, the UI for collapsible group is bad and need to update. Here is my screenshot:

    https://screenshots.firefox.com/CXW5u58MDPx6uxLS/localhost

    I’ll update the group to address this issue.

    Thanks for letting me know.

    #13175

    Ale
    Participant

    I’m having similar issues with std values not being added, I’ve updated today
    Meta Box Group to Version 1.2.18 and Metabox to Version 4.16.1.

    Is there any upcoming update that will fix this?

    #13359

    Anh Tran
    Keymaster

    Hey guys, the appearance and std value bugs are fixed in the latest version. Please update.

    #13362

    Ale
    Participant

    This is great and std is working as expected.

    Not sure if I should open a new topic but now the values from a field inside a group aren’t being copied when a field is in a group. Each clonable group has ‘clone_default’ => true

    #13381

    Anh Tran
    Keymaster

    Hi Ale, did you set clone_default per sub-field?

    #13506

    Hi,

    we are experiencing the same issue.

    array(
                        'id' => $this->prefix . '_event_guests',
                        'type' => 'group',
                        'clone'  => true,
                        'sort_clone' => true,
                        'collapsible' => true,
                        'default_state' => 'collapsed',
                        'save_state' => true,
                        'name' => esc_html__('Guests', 'ceps'),
                        'group_title' => array( 'field' => 'name' ),
                        'fields' => array(
                            array(
                                'name' => 'Name',
                                'id'   => 'name',
                                'type' => 'text',
                            ),
                            array(
                                'name' => 'Description',
                                'id'   => 'description',
                                'type' => 'textarea',
                            ),
    
                        )

    When refreshing the page, the tabs are not collapsed. Only when manually triggering them the state gets saved.

    Latest Version of both plugins installed.

    #13507

    Ale
    Participant

    Adding clone_default for every subfield did the trick, thanks.

    #13628

    @Anh Tran,

    are you aware of the issue? The state entered inside the array is not parsed into the final data HTML attribute output as far as I can see.

    #13633

    Anh Tran
    Keymaster

    Hi Matthias, sorry I was looking to solve Ale’s problem. Let me check with the group state.

    #13710

    Tu Duong
    Participant

    Hi, Matthias Nettekoven
    I checked with the code you sent, then found everything working normally, didn’t see the error you described
    code demo : https://ghostbin.com/paste/p4pz7
    video demo: https://youtu.be/DWyQPYVp7Lk

Viewing 10 replies - 1 through 10 (of 18 total)

You must be logged in to reply to this topic.