I'm trying to use this to achieve the functionality of having a checkbox that, when selected, causes a range of checkboxes to all be selected. I made the selectall box a separate form field, and it looks like this, and works not a lick:
$form['report_group']['selectall'] = array(
'#type' => 'checkbox',
'#default_value' => 0,
);
$form['report_group']['boxes'] = array(
'#type' => 'checkboxes',
'#options' => $boxes,
'#states' => array(
'checked' => array(
':input[name="report_group[selectall]"]' => array('checked' => TRUE),
),
),
);
just a typo in the question?