Support Forum
Support › Meta Box Group › Collapsible Attribute
Hello,
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
Hi,
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).
Wow thank your very much for this fast support.
But 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',
I'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.
Thank 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
Can you post your code here? I tested it many times before 🙁
$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,
)
)
)
)
)
)
);
I got it. We're updating the MB Settings Page extension to fix all the styling issues. Please wait a little.
Hi, 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.
Thank 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
Markus
Ah, it's the default behavior. When cloning a group, all the states are cleared and thus, sub-groups are expanded.
Hello, here 3 images for better understanding.
http://imgur.com/a/wGtR9
Thank your ver much
Markus
I understand the issue. It’s what I designed to work like that. I will update the group to maintain the collapsible state.
Thank you very much
Best regards
Markus Fröhlich