Group not working properly
- This topic has 18 replies, 6 voices, and was last updated 6 years ago by
Matthias Nettekoven.
-
AuthorPosts
-
January 26, 2019 at 12:37 AM #13137
Dragan
ParticipantI 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 groupThe 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:
January 29, 2019 at 11:19 PM #13159Anh Tran
KeymasterHi 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.
January 31, 2019 at 11:31 PM #13175Ale
ParticipantI'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?
February 15, 2019 at 4:24 PM #13359Anh Tran
KeymasterHey guys, the appearance and
std
value bugs are fixed in the latest version. Please update.February 15, 2019 at 6:12 PM #13362Ale
ParticipantThis 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
February 17, 2019 at 1:30 PM #13381Anh Tran
KeymasterHi Ale, did you set
clone_default
per sub-field?February 28, 2019 at 8:41 PM #13506Matthias Nettekoven
ParticipantHi,
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.
February 28, 2019 at 9:12 PM #13507Ale
ParticipantAdding clone_default for every subfield did the trick, thanks.
March 9, 2019 at 7:36 PM #13628Matthias 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.
March 10, 2019 at 8:02 AM #13633Anh Tran
KeymasterHi Matthias, sorry I was looking to solve Ale's problem. Let me check with the group state.
March 13, 2019 at 11:04 AM #13710Tu Duong
ParticipantHi, 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/DWyQPYVp7LkMarch 13, 2019 at 4:29 PM #13711Matthias Nettekoven
ParticipantHi,
if you make use of the save state, but what if this should not be saved?
April 11, 2019 at 6:15 PM #14127Matthias Nettekoven
ParticipantHi,
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.
April 12, 2019 at 11:07 AM #14133Anh Tran
KeymasterHi 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.
April 12, 2019 at 6:42 PM #14141badabingbreda
ParticipantCame 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.
-
AuthorPosts
- You must be logged in to reply to this topic.