I need to hide only one of the 2 children of a fieldset element.
I have an issue with the assigning the #type='hidden' value to 2 children elements of a fieldset.
In other words I have:
Array
(
[4] => Array
(
[#type] => hidden
[#title] => Distribution Product
[#default_value] => Array
(
)
[#options] => Array
(
[] => - None selected -
[0] => stdClass Object
(
[option] => Array
(
[38] => Cosmetics
)
)
[1] => stdClass Object
(
[option] => Array
(
[39] => Hair
)
)
)
[#description] =>
[#multiple] => 0
[#size] => 0
[#weight] => 0
[#theme] => taxonomy_term_select
[#required] => 0
)
[1] => Array
(
[#type] => select
[#title] => Product
[#default_value] => Array
(
[0] => 26
)
[#options] => Array
(
[] => - None selected -
[0] => stdClass Object
(
[option] => Array
(
[28] => Cosmetics
)
)
[1] => stdClass Object
(
[option] => Array
(
[26] => -Joelle Ciocco
)
)
)
[#description] =>
[#multiple] => 0
[#size] => 0
[#weight] => 0
[#theme] => taxonomy_term_select
[#required] => 0
)
[#type] => fieldset
[#title] => Vocabularies
[#collapsible] => 1
[#collapsed] =>
[#weight] => -3
[#tree] => 1
)
I'm currectly assigning
$form['taxonomy'][4]['#type'] = 'hidden';
$form['taxonomy'][1]['#type'] = 'hidden';
But they are both visible.
Of course if I hide
$form['taxonomy']['#type'] = 'hidden';
it works and I hide everything.
thanks