我试图根据用户从实体引用复选框列表中选择的内容来隐藏字段,但无论我做什么,我都无法隐藏该字段。
我觉得选择器有点问题。
$form['title']['#states']['invisible'][] = array(
'input[name="field_offering_course[und][0][target_id]"' =>array('checked' => TRUE));

发布于 2016-11-30 07:33:59
您缺少一个括号:
'input[name="field_offering_courseundtarget_id"]‘=>array('checked’=> TRUE);
我不能提供更多,但that...not非常有经验的php :D
https://stackoverflow.com/questions/40872578
复制相似问题