function active_tags_node_form_attach in Active Tags 6.2
Same name and namespace in other branches
- 6 active_tags.module \active_tags_node_form_attach()
Enables Active Tags for core taxonomy tag vocabularies.
1 string reference to 'active_tags_node_form_attach'
- active_tags_form_alter in ./
active_tags.module - Implementation of hook_form_alter.
File
- ./
active_tags.module, line 62 - Active Tags widget for free tagging taxonomies
Code
function active_tags_node_form_attach($form, $form_state) {
$settings = array();
foreach ($form['taxonomy']['tags'] as $id => $values) {
if (variable_get('active_tags_' . $id, 0) == 1) {
$settings[] = "#edit-taxonomy-tags-{$id}-wrapper";
}
}
// Only load files if we found active tags enabled fields.
if (!empty($settings)) {
active_tags_enable_widget($settings, $form_state['submitted']);
}
return $form;
}