After recent upgrade of fieldgroup module, the conditional state visibility for field group does not work now.
Please find the previous code that used to work:
function ji_custom_field_group_build_pre_render_alter(&$element) {
//BioChemistry
if(isset($element['group_tr_biochemistry'])){
$element['group_tr_biochemistry']['#states'] = array(
'visible' => array(
':input[name="field_tr_test_ref[und]"]' => array('value' => 12),
),
);
}
//CBC
if(isset($element['group_tr_cbc'])){
$element['group_tr_cbc']['#states'] = array(
'visible' => array(
':input[name="field_tr_test_ref[und]"]' => array('value' => 15),
),
);
}
}
However this does not work after the upgrade. I get an PHP notice instead:
Notice: Undefined index: #id in drupal_process_states() (line 4651 of /srv/www/www.example.com/public_html/includes/common.inc).
Do let me know the workaround possible. Thanks.