1

I have a node type 'review' which is attached to two vocabularies and are appearing in a fieldset named VOCABULARIES in the node form. But what i don't want them to be in a fieldset. I am using the function in a module and have also increased the module weight but no success till now. Can any one tell me what i am doing wrong here..?

<?php
function mymodule_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'review_node_form') {
      $form['taxonomy'][2]['#collapsible'] = FALSE;
      $form['taxonomy'][3]['#collapsible'] = FALSE;
    }
  }
?>
1
  • Looks OK at first sight... are you certain that the form_id is corrrect? Have you checked if $form['taxonomy'] is already present in the form when your form_alter is executed? Mar 11, 2010 at 9:17

1 Answer 1

0

IIRC, the 'taxonomy' entry itself is the fieldset, so you might try:

function mymodule_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'review_node_form') {
    $form['taxonomy']['#collapsible'] = FALSE;
    $form['taxonomy']['#collapsed'] = FALSE;
  }
}

Note that this would only make the fieldset expanded and non collapsible, but not remove it.

1
  • thanks.. it did disabled the collapsing of the fieldset but is there a way to remove the the border around it altogether? i tried css but was unable to target this specific fieldset.
    – user251722
    Mar 11, 2010 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.