• Creator
    Topic
  • #8850
    FED
    Participant

    Hi! This is a little different than this question: https://metabox.io/support/topic/cloneable-group-with-tabs/

    I'd like to have tabs within an existing group. Is that possible? Non-working sudo-code example:

    
    array(
     'id' => 'panel',
     'type' => 'group',
     'hidden' => array('type', '!=', 'connect'),
     'tabs'      => array(
       'connect'    => array(
           'label' => 'Connect',
           'icon' => 'Tab icon'
         ),
       'social' => array(
           'label' => 'Social media',
           'icon' => 'Tab icon'
       ),
       'address'  => array(
           'label' => 'Address',
           'icon' => 'Tab icon'
        ),
      ),
     'fields' => array(
        array(
         'name' => 'Connect Panel',
         'id'   => 'description',
         'type' => 'custom_html',
         'std'  => 'explanation on how to use this',
        ),
        array(
          'id' => 'social',
          'type' => 'group',
          'tab'  => 'social',
            array(
             'name' => 'Facebook URL',
             'id'   => 'facebook',
             'type' => 'url',
             'desc' => 'Example: https://www.facebook.com/your-facebook-page',
            ),
          ),
        array(
          'id' => 'address',
          'type' => 'group',
          'tab'  => 'address',
    
          'fields' => array(
            array(
              'type' => 'heading',
              'name' => 'Address',
          ),
        ),
        array(
          'id' => 'general',
          'type' => 'group',
          'tab'  => 'connect',
          
          'fields' => array(
            array(
              'name' => 'Email',
              'id'   => 'email',
              'type' => 'email',
              'desc' => 'example@email.com',
            ),
        ),
      )
    );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #8851
    Anh Tran
    Keymaster

    Hi,

    Unfortunately, tabs is not supported in groups yet 🙁

    #8874
    FED
    Participant

    Ah, ok. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tabs in a group’ is closed to new replies.