function tabsexample_form in Javascript Tools 5
Generate an example set of tabs.
1 call to tabsexample_form()
- tabsexample_menu in tabs/
docs/ tabsexample.module - Implementation of hook_menu().
File
- tabs/
docs/ tabsexample.module, line 25
Code
function tabsexample_form() {
$form = array();
$form['example1'] = array(
'#type' => 'tabset',
);
$form['example1']['tab1'] = array(
'#type' => 'tabpage',
'#title' => t('One'),
'#content' => t('First tab content.'),
);
$form['example1']['tab2'] = array(
'#type' => 'tabpage',
'#title' => t('Two'),
'#content' => t('Second tab content.'),
);
$form['example1']['tab2']['tabset2'] = array(
'#type' => 'tabset',
);
$form['example1']['tab2']['tabset2']['tab1'] = array(
'#type' => 'tabpage',
'#title' => t('One'),
'#content' => t('First tab content.'),
);
$form['example1']['tab2']['tabset2']['tab2'] = array(
'#type' => 'tabpage',
'#title' => t('Two'),
'#content' => t('Second tab content.'),
);
$form['example1']['tab3'] = array(
'#type' => 'tabpage',
'#title' => t('Three'),
'#content' => t('Third tab content.'),
);
return $form;
}