3

While creating a (custom) content in Drupal, I have three vocabularies. But these make my create content page very heavy. I want to collapse the Vocubalary fieldset by default and want it to expand only if user chooses to.

Henrik Opel
  • 19,341
  • 1
  • 48
  • 64
w2lame
  • 2,774
  • 6
  • 35
  • 48
  • I edited your question and title to clarify what you want, as I assume by 'DropDown', you mean the fieldset (the collapsible/expandable frame around the taxonomy fields). If this is not what you meant, just revert my change (or tell me to do so). – Henrik Opel Jun 18 '10 at 16:12

2 Answers2

3

If you mean that the taxonomy fieldset should be displayed as collapsed by default, you can achieve that by implementing hook_form_alter():

/**
 * Implementation of hook_form_alter().
 */
function yourModule_form_alter(&$form, &$form_state, $form_id) {
  // TODO: Adjust the form id according to your content type
  if ($form_id == 'yourContentType_node_form') {
    // Collapse 'Vocabularies' fieldset.
    $form['taxonomy']['#collapsed'] = TRUE;
  }
}
Henrik Opel
  • 19,341
  • 1
  • 48
  • 64
  • Having trouble getting your example to work. Can you say more about what yourContentType_node_form should look like? – bflora2 Dec 21 '10 at 16:36
1

Big Autocomplete TAXonomy (BATAX) will probably do what you want.

Jeremy French
  • 11,707
  • 6
  • 46
  • 71
  • Not actually, for two fields I am already using Autocomplete fields. I just want the drop down Vocubulary which is opened by default should be closed by default. – w2lame Jun 18 '10 at 16:02