1 form_test.module _form_test_vertical_tabs_form($form, &$form_state)

Tests functionality of vertical tabs.

File

core/modules/simpletest/tests/form_test.module, line 749
Helper module for the form API tests.

Code

function _form_test_vertical_tabs_form($form, &$form_state) {
  $form['vertical_tabs'] = array(
    '#type' => 'vertical_tabs',
  );
  $form['tab1'] = array(
    '#type' => 'fieldset',
    '#title' => t('Tab 1'),
    '#collapsible' => TRUE,
    '#group' => 'vertical_tabs',
  );
  $form['tab1']['field1'] = array(
    '#title' => t('Field 1'),
    '#type' => 'textfield',
  );
  $form['tab2'] = array(
    '#type' => 'fieldset',
    '#title' => t('Tab 2'),
    '#collapsible' => TRUE,
    '#group' => 'vertical_tabs',
  );
  $form['tab2']['field2'] = array(
    '#title' => t('Field 2'),
    '#type' => 'textfield',
  );
  return $form;
}