Custom Fields
Re-Envisioned
Support Meta Box Group Collapsible Attribute

This topic contains 16 replies, has 2 voices, and was last updated by  weseo 1 year, 8 months ago.

  • Creator
    Topic
  • #6239

    weseo
    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

Viewing 10 replies - 1 through 10 (of 16 total)
  • Author
    Replies
  • #6247

    Anh 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

    weseo
    Participant

    Wow thank your very much for this fast support.

    #6249

    weseo
    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 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

    weseo
    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 Tran
    Keymaster

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

    #6270

    weseo
    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 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 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

    weseo
    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

Viewing 10 replies - 1 through 10 (of 16 total)

You must be logged in to reply to this topic.