function quicktabs_form in Quick Tabs 6.3
Same name and namespace in other branches
- 5 quicktabs.module \quicktabs_form()
- 6 quicktabs.module \quicktabs_form()
- 6.2 includes/admin.inc \quicktabs_form()
- 7.3 quicktabs.admin.inc \quicktabs_form()
- 7.2 includes/admin.inc \quicktabs_form()
Build the quicktab creation and edit form.
2 string references to 'quicktabs_form'
- quicktabs_clone in includes/
admin.inc - Clone QuickTabs.
- quicktabs_menu in ./
quicktabs.module - Implementation of hook_menu().
File
- includes/
admin.inc, line 73
Code
function quicktabs_form($form_state, $formtype, $quicktabs = array()) {
$form = _qt_admin_main_form($form_state, $quicktabs);
$no_tabs = TRUE;
if (empty($quicktabs['tabs'])) {
$quicktabs['tabs'] = array(
0 => array(),
1 => array(),
);
}
else {
$no_tabs = FALSE;
$tab_titles = array();
}
// Add the current tabs to the form.
foreach ($quicktabs['tabs'] as $delta => $details) {
$details['delta'] = $delta;
$form['qt_wrapper']['tabs'][$delta] = _quicktabs_form($details, $quicktabs);
if (isset($details['title'])) {
$tab_titles[$delta] = $details['title'];
}
}
if (!$no_tabs) {
$form['default_tab'] = array(
'#type' => 'select',
'#title' => t('Default tab'),
'#options' => $tab_titles,
'#default_value' => $quicktabs['default_tab'],
'#weight' => -6,
);
}
return $form;
}