function content_taxonomy_autocomplete_widget_settings in Content Taxonomy 5
Same name and namespace in other branches
- 6.2 content_taxonomy_autocomplete.module \content_taxonomy_autocomplete_widget_settings()
- 6 content_taxonomy_autocomplete.module \content_taxonomy_autocomplete_widget_settings()
Implementation of hook_widget_settings
File
- ./
content_taxonomy_autocomplete.module, line 34 - Defines a widget type for content_taxonomy with autocomplete
Code
function content_taxonomy_autocomplete_widget_settings($op, $widget) {
switch ($op) {
case 'form':
$form = array();
$form['autocomplete'] = array(
'#type' => 'fieldset',
'#title' => t('Autocomplete'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['autocomplete']['new_terms'] = array(
'#type' => 'radios',
'#title' => t('How to manage new inputed terms from a user?'),
'#default_value' => isset($widget['new_terms']) ? $widget['new_terms'] : 'insert',
'#options' => array(
'insert' => t('Allow and insert new terms into the taxonomy tree'),
'deny' => t('Deny any new terms'),
),
);
return $form;
case 'save':
return array(
'new_terms',
);
}
}