Vertical Tabs: Wrapper problem

by Xyarvius   Last Updated April 15, 2019 09:07 AM

I have a form with several fieldsets and i am thinking about adding a vertical tabs form field to turn the current fieldset to vertical tabs but i use a lot of AJAX in the fieldsets. The AJAX elements need wrappers. I put the wrappers in the respective fieldsets for example:

$form['fieldset-general'] = [
    '#type' => 'fieldset',
    '#title' => t('<i class="glyphicon glyphicon-list-alt"></i>  General'),
    '#collapsible' => TRUE,
    '#prefix' => '<div id="general-fieldset-wrapper">',
    '#suffix' => ' </div>',
  ];

If i now add the vertical-tabs form field ...

$form['vertical-tabs-set'] = [
    '#type' => 'vertical_tabs',
  ];

... i have to disable the wrappers in my fieldsets for it to work:

$form['fieldset-general'] = [
    '#type' => 'fieldset',
    '#title' => t('General'),
    '#group' => 'vertical-tabs-set',
  ];

I've tried to add the wrapper to the vertical-tabs form field, or to new markup form fields but it didn't work.

Is here a way to make wrappers work in this case?

Tags : 7 forms ajax


Related Questions


Updated July 06, 2015 13:03 PM

Updated April 20, 2015 06:03 AM

Updated June 03, 2015 00:03 AM

Updated July 16, 2015 13:11 PM

Updated March 28, 2015 16:03 PM