views:

151

answers:

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;
    }
  }
?>
A: 

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.

Henrik Opel
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.

related questions