Vertical tabs to page


/**
* Implementation of forms of administration.
* add the hook_menu().
*/
function drupal_paste_analytics_form($form, &$form_state) {
$form['vertical_tabs'] = array(
'#type' => 'vertical_tabs',
);

/* first tab. */
$form['vertical_tab1'] = array(
'#type' => 'fieldset',
'#title' => 'Tab first',
'#group' => 'vertical_tabs',
);

/* Set of fields for the first vertical tab. */
$form['vertical_tab1']['pole_1_1'] = array(
'#type' => 'textarea',
'#title' => 'Multi-line input field',
'#default_value' => 'The default value for a multiline text on.',
);

$form['vertical_tab1']['pole_1_2'] = array(
'#type' => 'textfield',
'#title' => 'Single-line input field',
);

/*Second tab. */
$form['vertical_tab2'] = array(
'#type' => 'fieldset',
'#title' => 'Tab 2',
'#group' => 'vertical_tabs',
);

/* Set of fields for the second vertical tab */
$form['vertical_tab2']['pole_2_1'] = array(
'#type' => 'textfield',
'#title' => 'Tab 3',
);

$form['vertical_tab2']['pole_2_3'] = array(
'#type' => 'textfield',
'#title' => 'Tab 4',
);

return $form;
}

Категория: 
The code has been tested and works
Мультитег: