I am using drupal 7:
$form['title']['#tree'] = TRUE;
$form['title']['node_first'] = array(
'#type' => 'checkboxes',
'#options' => array(
'value' => $value->title,
),
);
$form['title']['node_second'] = array(
'#type' => 'checkboxes',
'#options' => array(
'value' => $value2->title,
),
);
i am getting this output after submitting (when first checkbox has been checked) :
Array
(
[title] => Array
(
[node_first] => Array
(
[value] => value
)
[node_second] => Array
(
[value] => 0
)
)
)
desired output:
Array
(
[title] => Array
(
[node_first] => Array
(
[value] => True
)
[node_second] => Array
(
[value] => False
)
)
)