When there are no fieldsets to render as tabs there vertical_tabs form element is still added and can leave a gray line on the page.

Where vertical_tabs_form_alter has

    	// The JavaScript and CSS specific for this form.
    	$js = array(drupal_get_path('module', 'vertical_tabs') .'/vertical_tabs.node_form.js');
    	$css = array();

    	$form['vertical_tabs'] = array(
      	'#vertical_tabs_settings' => $settings,
      	'#vertical_tabs_js' => $js,
      	'#vertical_tabs_css' => $css,
      	'#form_id' => $form_id,
      	'#type' => 'markup',
      	'#value' => '',
      	'#weight' => 100,
      	'#theme' => 'vertical_tabs',
    	);

change it to:

    if (!empty($settings)) {
    	// The JavaScript and CSS specific for this form.
    	$js = array(drupal_get_path('module', 'vertical_tabs') .'/vertical_tabs.node_form.js');
    	$css = array();

    	$form['vertical_tabs'] = array(
      	'#vertical_tabs_settings' => $settings,
      	'#vertical_tabs_js' => $js,
      	'#vertical_tabs_css' => $css,
      	'#form_id' => $form_id,
      	'#type' => 'markup',
      	'#value' => '',
      	'#weight' => 100,
      	'#theme' => 'vertical_tabs',
    	);
    }

This only adds the form element to the page if there is something to put in it.

Comments

najibx’s picture

yeah man , that does the job.

quicksketch’s picture

Status: Active » Fixed

Thanks committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.