Archive for December, 2013

form #states not working with literal integers as values in IE8

Solution –

// should get displayed based on selection on ‘principal’

$form[‘dependant’] = array(
‘#type’ => ‘textfield’,
‘#title’ => ‘Dependant’,
‘#states’ => array(
‘visible’ => array(
// (1) works with this, because a explicit string “1” is passed: ‘:input[name=”principal”]’ => array(‘value’ => “1”),
‘:input[name=”principal”]’ => array(‘value’ => 1), // doesn’t work in IE8
),
),
);

Ref –¬†https://drupal.org/node/1962800

Advertisements

Leave a comment