Using #states visible I am trying to make field_format visible after two select list fields have a specific values selected. I thought be not using 'or' 'xor' that both are required but its not working. this is doing the same thing as using 'or',

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'page_node_form') {
    $form['field_format']['#states'] = array(
      'visible' =&gt; array(
          array(':input[name="field_item_type[und]"]' =&gt; array('value' =&gt;     'tv_show')),
          array(':input[name="field_extra[und]"]' =&gt; array('value' =&gt;     'bike')),
      ),
    );
  }
}
Here is some example code. Maybe your selector is incorrect?

$form['main']['elem1'] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; t('1'),
  '#options' =&gt; drupal_map_assoc(array('A', 'B')),
);
$form['main']['elem2'] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; t('2'),
  '#options' =&gt; drupal_map_assoc(array('A', 'B')),
);

$form['main']['elem3'] = array(
  '#type' =&gt; 'textfield',
  '#value' =&gt; t('3'),
  '#states' =&gt; array(
    'visible' =&gt; array(
      'xor',
      array(':input[name="elem1"]' =&gt; array('value' =&gt; 'A')),
      // XOR.
      array(':input[name="elem2"]' =&gt; array('value' =&gt; 'A')),
    ),
  ),
);
$form['main']['elem4'] = array(
  '#type' =&gt; 'textfield',
  '#value' =&gt; t('4'),
);
$form['main']['elem5'] = array(
  '#type' =&gt; 'textfield',
  '#value' =&gt; t('5'),
  '#states' =&gt; array(
    'visible' =&gt; array(
      ':input[name="elem1"]' =&gt; array('value' =&gt; 'A'),
      ':input[name="elem2"]' =&gt; array('value' =&gt; 'A'),
    ),
  ),
);


And then the alter function.

function module_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'af_aam_aam_form') {
    $form['main']['elem4']['#states'] = array(
      'visible' =&gt; array(
        array(':input[name="elem1"]' =&gt; array('value' =&gt; 'A')),
        // OR.
        array(':input[name="elem2"]' =&gt; array('value' =&gt; 'A')),
      ),
    );
  }
}