0

I am trying to hide a field based on what user is selecting from a entity referenced checkbox list but no matter what I do I cannot hide the field.

I think some issue with the selector.

 $form['title']['#states']['invisible'][] = array(
  'input[name="field_offering_course[und][0][target_id]"' =>array('checked' => TRUE));

Attached is the view source for the checkbox

Neela
  • 311
  • 1
  • 4
  • 16

1 Answers1

0

You are missing a bracket:

'input[name="field_offering_course[und][0][target_id]"]' =>array('checked' => TRUE));

I can't help more than that...not very experienced in php :D

Chris Happy
  • 7,088
  • 2
  • 22
  • 49