function notifications_tags_form_alter in Notifications 6
Same name and namespace in other branches
- 5 notifications_tags/notifications_tags.module \notifications_tags_form_alter()
- 6.4 notifications_tags/notifications_tags.module \notifications_tags_form_alter()
- 6.2 notifications_tags/notifications_tags.module \notifications_tags_form_alter()
- 6.3 notifications_tags/notifications_tags.module \notifications_tags_form_alter()
Implementation of hook_form_alter().
Admin settings form. Omitted taxonomy vocabularies.
File
- notifications_tags/
notifications_tags.module, line 116 - Subscriptions to taxonomy terms
Code
function notifications_tags_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'notifications_content_settings_form') {
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vocabulary) {
$select[$vocabulary->vid] = check_plain($vocabulary->name);
}
$form['tags'] = array(
'#type' => 'fieldset',
'#title' => t('Tag subscriptions'),
'#collapsible' => TRUE,
'#weight' => 0,
);
$form['tags']['notifications_tags_vocabularies'] = array(
'#type' => 'checkboxes',
'#title' => t('Allowed vocabularies'),
'#default_value' => notifications_tags_vocabularies('vid'),
'#options' => $select,
'#description' => t('Select vocabularies to which subscriptions should be <em>allowed</em>.'),
'#multiple' => TRUE,
);
}
}