Group not working properly

Support MB Group Group not working properlyResolved

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #13137
    DraganDragan
    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

    #13159
    Anh TranAnh 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
    AleAle
    Participant

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

    Is there any upcoming update that will fix this?

    #13359
    Anh TranAnh Tran
    Keymaster

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

    #13362
    AleAle
    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 TranAnh Tran
    Keymaster

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

    #13506
    Matthias NettekovenMatthias Nettekoven
    Participant

    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
    AleAle
    Participant

    Adding clone_default for every subfield did the trick, thanks.

    #13628
    Matthias NettekovenMatthias Nettekoven
    Participant

    @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 TranAnh Tran
    Keymaster

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

    #13710
    Tu DuongTu 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

    #13711
    Matthias NettekovenMatthias Nettekoven
    Participant

    Hi,

    if you make use of the save state, but what if this should not be saved?

    #14127
    Matthias NettekovenMatthias Nettekoven
    Participant

    Hi,

    this still does not work even after updating. According to the change log it was fixed but when I test it, boxes are still un-collapsed.

    'clone'  => true,
    'sort_clone' => true,
    'collapsible' => true,
    'default_state' => 'collapsed',

    The save state is no option since it will blow up the array. Any help on this would be great. Its been a month now.

    #14133
    Anh TranAnh Tran
    Keymaster

    Hi Matthias,

    Looks like we fixed only for the non-clonable groups. Let me check and fix for cloneable groups.

    Update: I've just fixed this bug and release version 1.3.3. Please update.

    #14141
    badabingbredabadabingbreda
    Participant

    Came here for this problem, but even with update 1.3.3 it persists.

                         'name'   => 'Order Regels', // Optional
                            'id'     => 'orderregels',
                            'type'   => 'group',
                            'clone'  => true,
                            // Drag and drop clones to reorder them?
                            'sort_clone' => true,
                            // Sub-fields
                            'collapsible'   => true,            // true / false
                            'save_state'    => false,            // true / false
                            'default_state' => 'collapsed',     // collapsed / expanded
                            'add_button' => 'Artikel toevoegen',
                            'group_title' => array( 'field' => 'artikelid' ),

    Also, when there's only one item in the group there's no way of removing it. You have to create a new one first because the remove link doesn't show, only the sort drag-handle.

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