Collapsible Attribute

Support MB Group Collapsible Attribute

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #6239
    weseoweseo
    Participant

    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

    #6247
    Anh TranAnh Tran
    Keymaster

    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).

    #6248
    weseoweseo
    Participant

    Wow thank your very much for this fast support.

    #6249
    weseoweseo
    Participant

    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',
    #6254
    Anh TranAnh Tran
    Keymaster

    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.

    #6258
    weseoweseo
    Participant

    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

    #6259
    Anh TranAnh Tran
    Keymaster

    Can you post your code here? I tested it many times before 🙁

    #6270
    weseoweseo
    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,
                            )
                        )
                    )
                )
            )
        )
    );
    #6274
    Anh TranAnh Tran
    Keymaster

    I got it. We're updating the MB Settings Page extension to fix all the styling issues. Please wait a little.

    #6279
    Anh TranAnh Tran
    Keymaster

    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.

    #6281
    weseoweseo
    Participant

    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

    #6293
    Anh TranAnh Tran
    Keymaster

    Ah, it's the default behavior. When cloning a group, all the states are cleared and thus, sub-groups are expanded.

    #6297
    weseoweseo
    Participant

    Hello, here 3 images for better understanding.
    http://imgur.com/a/wGtR9

    Thank your ver much
    Markus

    #6298
    Anh TranAnh Tran
    Keymaster

    I understand the issue. It’s what I designed to work like that. I will update the group to maintain the collapsible state.

    #6310
    weseoweseo
    Participant

    Thank you very much

    Best regards
    Markus Fröhlich

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.