I really don't get why this is not working. I want to avoid a specific form item being collapsed.
This is my element I want to modify (after the change with the code below):
[taxonomy] => Array
(
[tags] => Array
(
[1] => Array
(
[#type] => textfield
[#title] => Tags
[#description] => A comma-separated list of terms describing this content. Example: funny, bungee jumping, "Company, Inc.".
[#required] => 0
[#default_value] =>
[#autocomplete_path] => taxonomy/autocomplete/1
[#weight] => 0
[#maxlength] => 1024
[#collapsed] => 0
[#collapsible] => 0
)
[#collapsed] => 0
[#collapsible] => 0
)
[#weight] => -3
[#tree] => 1
[#collapsed] => 0
[#collapsible] => 0
This is my code in hook_form_alter (I'm sure the form is modified by the code):
$form['taxonomy']['#collapsed'] = 0;
$form['taxonomy']['tags']['#collapsed'] = 0;
$form['taxonomy']['tags'][2]['#collapsed'] = 0;
$form['taxonomy']['#collapsible'] = 0;
$form['taxonomy']['tags']['#collapsible'] = 0;
$form['taxonomy']['tags'][3]['#collapsible'] = 0;
But it doesn't work. The element is always collapsed. And I've refreshed all caches
http://dl.dropbox.com/u/72686/tagsform.txt
Update2:
$form['taxonomy']['#required'] = TRUE;
$form['taxonomy']['tags']['#required'] = TRUE;
$form['taxonomy']['tags'][5]['#required'] = TRUE;