Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When a user edits a taxonomy term, there is a link for "Relations" at the bottom. how can I make that link not show up for certain roles? I don't believe we are using relations at all for taxonomy terms.
Comments
Comment #1
Snehal Brahmbhatt CreditAttribution: Snehal Brahmbhatt at AddWeb Solution Pvt. Ltd. commented@dianacastillo,
Yes, you can do it by hook_form_alter()
i.e.
/**
* Implementation of hook_form_alter()
*
* Some code taken from https://www.drupal.org/node/2158985
*/
function hide_taxonomy_fieldset_form_alter(&$form, $form_state){
if($form['#form_id'] ==='taxonomy_form_term')
$form['relations']['#access'] = FALSE;
}
Thanks!
Comment #2
dianacastillo CreditAttribution: dianacastillo commentedthanks!
Comment #3
dianacastillo CreditAttribution: dianacastillo commented