I have a view that shows guest user generated articles grouped by taxonomy terms. There is just one taxonomy term which I don't want that users add articles with (only logged in users should). So how can I exclude this taxonomy term from the select list on the node add page? I suppose by some function in the theme file?
1 Answer
You need to implement hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) inside a custom module.
Inside the form parameter you should be able to unset the specific option that you don't want to be displayed.
-
I'm already using form alters in my theme file. Does it really have to be in a custom module? Mar 31, 2017 at 18:07
-