function forum_form_taxonomy_term_form_alter
Same name in other branches
- 8.9.x core/modules/forum/forum.module \forum_form_taxonomy_term_form_alter()
- 10 core/modules/forum/forum.module \forum_form_taxonomy_term_form_alter()
- 11.x core/modules/forum/forum.module \forum_form_taxonomy_term_form_alter()
Implements hook_form_FORM_ID_alter() for \Drupal\taxonomy\TermForm.
File
-
core/
modules/ forum/ forum.module, line 311
Code
function forum_form_taxonomy_term_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$vid = \Drupal::config('forum.settings')->get('vocabulary');
if (isset($form['vid']['#value']) && $form['vid']['#value'] == $vid) {
// Hide multiple parents select from forum terms.
$form['relations']['parent']['#access'] = FALSE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.