function content_taxonomy_activeselect_widget_settings in Content Taxonomy 5
Implementation of hook_widget_settings
File
- ./
content_taxonomy_activeselect.module, line 35 - Defines a widget type for content_taxonomy with activeselects
Code
function content_taxonomy_activeselect_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$options_term = array();
$options_term[0] = '---';
foreach (taxonomy_get_vocabularies() as $voc) {
foreach (taxonomy_get_tree($voc->vid) as $term) {
$options_term[$voc->name][$term->tid] = $term->name;
}
}
$form['activeselect'] = array(
'#type' => 'fieldset',
'#title' => t('Activeselect'),
'#collapsible' => TRUE,
'#description' => t(''),
);
$form['activeselect']['label_children'] = array(
'#type' => 'textfield',
'#title' => t('Label for second bar'),
'#default_value' => isset($widget['label_children']) ? $widget['label_children'] : '',
'#size' => 60,
);
$form['activeselect']['grandchildren'] = array(
'#title' => t('Third bar'),
'#type' => 'checkbox',
'#default_value' => isset($widget['grandchildren']) ? $widget['grandchildren'] : 0,
);
$form['activeselect']['label_grandchildren'] = array(
'#type' => 'textfield',
'#title' => t('Label for third bar'),
'#default_value' => isset($widget['label_grandchildren']) ? $widget['label_grandchildren'] : '',
'#size' => 60,
);
return $form;
case 'save':
return array(
'grandchildren',
'label_children',
'label_grandchildren',
);
}
}