How can I check if a select field has been used with states? I have a form where I'd like to hide a fieldset until the user has used a select (which option doesn't matter).

So far I've the following code:

$form['location'] = array(
  '#type' =&gt; 'select',
  '#options' =&gt; $locations,
  '#required' =&gt; true,
);

$form['uploads'] = array(
  '#type' =&gt; 'fieldset',
  '#title' =&gt; 'Foobar',
  '#states' =&gt; array(
    'visible' =&gt; array(
      'select[name="location"]' =&gt; array('empty' =&gt; false)
    )
  )
);


Apparently empty, checked, filled don't do the trick. If I check for one specific value with the following code works.

'#states' =&gt; array(
  'visible' =&gt; array(
    'select[name="location"]' =&gt; array('value' =&gt; 'foo')
  )
)


But what would be the solution for the check if any value has been selected?
I haven't tried it but a simple negate on an empty string might work:

'#states' =&gt; array(
  'visible' =&gt; array(
    'select[name="location"]' =&gt; array('!value' =&gt; '')
  )
)