Collapsible Attribute
- This topic has 16 replies, 2 voices, and was last updated 7 years, 8 months ago by
weseo.
-
AuthorPosts
-
July 5, 2017 at 6:07 PM #6239
weseo
ParticipantHello,
the collapsible feature is very awesome and useful.
Is it possible to set the group default to folded for a better overview?Thank you very much
July 6, 2017 at 9:45 AM #6247Anh Tran
KeymasterHi,
This is a good idea! I've just added a new param for group "default_state" which accepts "collapsed" value. So you can see it collapsed by default.
Please update group to the latest version (1.2.8).
July 6, 2017 at 3:34 PM #6248weseo
ParticipantWow thank your very much for this fast support.
July 6, 2017 at 3:54 PM #6249weseo
ParticipantBut on a settings page with nested group fields, the feature wont works 🙁
array( 'name' => __('Users').' '.__('Profile'), 'id' => 'my_custom_user_fields', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'default_state' => 'collapsed',
July 7, 2017 at 9:19 AM #6254Anh Tran
KeymasterI've just tested with settings page and it works for me. Can you try in the browser private mode (with history and cookie cleared)? On some browsers like Firefox, the state of the inputs is saved by the browser, so if you open it once, it will be opened next time you access the page, regardless the settings.
July 7, 2017 at 6:21 PM #6258weseo
ParticipantThank you, now it works very well.
But when i have a nested collapsed group, i cant add a new group.
When i click on the "new element" Button, all other groups become a display issue.Big Thanks
July 7, 2017 at 7:59 PM #6259Anh Tran
KeymasterCan you post your code here? I tested it many times before 🙁
July 10, 2017 at 1:56 PM #6270weseo
Participant$meta_boxes[] = array( 'id' => 'my_form_id', 'title' => __('Custom Fields'), 'settings_pages' => my_settings, 'tab' => 'custom_user_fields', 'fields' => array( array( 'name' => __('Users').' '.__('Profile'), 'id' => 'custom_user_fields', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'save_state' => true, 'group_title' => array( 'field' => 'field_id' ), 'fields' => array( array( 'name' => __('Field ID'), 'id' => 'field_id', 'type' => 'text', ), array( 'name' => __('Predefined Values', 'weseo-crm'), 'id' => 'field_values', 'type' => 'group', 'clone' => true, 'sort_clone' => true, 'collapsible' => true, 'save_state' => true, 'group_title' => array( 'field' => 'label' ), 'fields' => array( array( 'name' => __('Label'), 'id' => 'label', 'type' => 'text', 'columns' => 6, ), array( 'name' => __('Value'), 'id' => 'value', 'type' => 'text', 'columns' => 6, ) ) ) ) ) ) );
July 11, 2017 at 8:46 AM #6274Anh Tran
KeymasterI got it. We're updating the MB Settings Page extension to fix all the styling issues. Please wait a little.
July 12, 2017 at 11:13 AM #6279Anh Tran
KeymasterHi, I've just updated the MB Settings Page extension to the version 1.3. Please update both Meta Box (to version 4.12.2) and the MB Settings Page extension. Thanks.
July 12, 2017 at 2:06 PM #6281weseo
ParticipantThank you for the update!
But now, when both groups (The main and the nested) are collapsed and i click on the "Add" Buttton, all nested groups going to be unfolded.Best regards
MarkusJuly 13, 2017 at 8:36 AM #6293Anh Tran
KeymasterAh, it's the default behavior. When cloning a group, all the states are cleared and thus, sub-groups are expanded.
July 13, 2017 at 3:31 PM #6297weseo
ParticipantHello, here 3 images for better understanding.
http://imgur.com/a/wGtR9Thank your ver much
MarkusJuly 13, 2017 at 9:31 PM #6298Anh Tran
KeymasterI understand the issue. It’s what I designed to work like that. I will update the group to maintain the collapsible state.
July 14, 2017 at 1:26 PM #6310weseo
ParticipantThank you very much
Best regards
Markus Fröhlich -
AuthorPosts
- You must be logged in to reply to this topic.