how to change the name of the taxonomy fieldset
freelylw - May 26, 2009 - 22:13
Whenever there is more than 1 taxonomy for a content type, the taxonomy will be showing inside a js fiedset which call 'Vocabularies'.
I don't know where I can change this title of 'Vocabularies' or where can disable this fieldset ?
I prefer the taxonomy not showing inside the fieldset .
Thanks

formdefaults
I guess there are better ways, but the formdefaults module (10 KB) would allow you to customize the fieldset label.
'String Overrides' module
Same here. Other options are:
'Formfilter' module at http://drupal.org/project/formfilter
'String Overrides' module to edit the fieldset label 'Vocabularies'. http://drupal.org/project/stringoverrides
'Jammer' module to remove or hide other parts of forms at http://drupal.org/project/jammer
---
How to contribute to Drupal.
Solution for you...
Follow the steps on this page that I just wrote: http://drupal.org/node/561078
Thank you
Thank you Chris! How would you apply a specific name based on Content Type? E.g.: Story Categories, Page Vocabularies, etc...
Also, would it be possible to remove the fieldset alltogether (often it does not add anything meaningful to the form really...)?
To apply a specific name
To apply a specific name based on content type, you would edit the code in vocabularies_fieldset_to_categories_fieldset.module so that it's similar to the following:
<?php
//In this example, the module basically says "if the content type is "forum" and the title of the fieldset is "Vocabularies", then change the title of the fieldset to "Forums". You can also copy the whole if statement so that you have 2 different if statements, with one checking if the content type is forum and the other checking if the content type is some other specific content type you've created.
function change_vocabularies_fieldset_name_form_alter(&$form, $form_state, $form_id) {
if(($form['type']['#value'] == 'forum') && ($form['taxonomy']['#title'] == 'Vocabularies')) {
//In the line below, set the name of the Vocabularies fieldset
$form['taxonomy']['#title'] = 'Forums';
}
}
As far as removing the fieldset altogether, you have a couple options (maybe more)...
A) you could uncheck the content type from the vocabulary's settings at admin/content/taxonomy
B) you could set the #access to 0 via an additional line in the custom module, or in that content type's template file (like a file named mycontenttype.tpl.php if your content type is called 'mycontenttype').
If you decide to go with option B, and decide to do it by putting an additional line in the custom module, the module's code could look like this:
<?php
//In this example, the module basically says "if the content type is "forum" and the title of the fieldset is "Vocabularies", then change the title of the fieldset to "Forums". It then also says "if the content type is "mytype" then don't display the taxonomy fieldset.
function change_vocabularies_fieldset_name_form_alter(&$form, $form_state, $form_id) {
if(($form['type']['#value'] == 'forum') && ($form['taxonomy']['#title'] == 'Vocabularies')) {
//In the line below, set the name of the Vocabularies fieldset
$form['taxonomy']['#title'] = 'Forums';
}
if($form['type']['#value'] == 'mytype') {
//In the line below, set the name of the Vocabularies fieldset
$form['taxonomy']['#access'] = '0';
}
}