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

  • 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 8 replies - 11 through 18 (of 18 total)
  • Author
    Replies
  • #13711
    Matthias Nettekoven
    Participant

    Hi,

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

    #14127
    Matthias 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 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
    badabingbreda
    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.

    #14142
    Anh Tran
    Keymaster

    Have you tried clearing browser cache? It’s an update of JS and requires to clear cache!

    Regarding the removal, when there is one instance, the remove link/button won’t show. It’s for you to enter data.

    #14143
    badabingbreda
    Participant

    You’re absolutely right, clearing cache worked.

    Regarding the removal: Shouldn’t I be able to have a group with 0 (zero) iterations?

    #14144
    Anh Tran
    Keymaster

    Unfortunately, not. It should be consistent with other cloenable fields.

    #14147
    Matthias Nettekoven
    Participant

    Thanks. Update did solve it 🙂

Viewing 8 replies - 11 through 18 (of 18 total)
  • You must be logged in to reply to this topic.