I created a group using MB Builder and set it to:
and added some fields with default values and conditional logic.
NOTE: my fields work perfectly when not in group
The result is:
Is there a bug or limitations with the group extension?
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:
I'll update the group to address this issue.
Thanks for letting me know.
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?
Hey guys, the appearance and
std value bugs are fixed in the latest version. Please update.
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
Hi Ale, did you set
clone_default per sub-field?
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.
Adding clone_default for every subfield did the trick, thanks.
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.
Hi Matthias, sorry I was looking to solve Ale's problem. Let me check with the group state.
if you make use of the save state, but what if this should not be saved?
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.
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.
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.