8 - form #states greater than x How do I use #states to show an field if the value of another field is greater than one of my variables?

The code below is for =$chkval

$chkval = 4;
// This would be set by a database query

'#states' =&gt; array(
    'visible'=&gt; array(
        ':input[name = 'actual_reps'] =&gt; array('value' =&gt; $chkval)
    )
)
Unfortunately, Drupal does support that.

The following states may be applied to an element:

enabled
disabled
required
optional
visible
invisible
checked
unchecked
expanded
collapsed

The following states may be used in remote conditions:

empty
filled
checked
unchecked
expanded
collapsed
value

The following states exist for both elements and remote conditions,
but are not fully implemented and may not change anything on the
element:

relevant
irrelevant
valid
invalid
touched
untouched
readwrite
readonly

When referencing select lists and radio buttons in remote conditions,
a 'value' condition must be used:
@code
'#states' =&gt; array(
// Show the settings if 'bar' has been selected for 'foo'.
'visible' =&gt; array(
':input[name=&quot;foo&quot;]' =&gt; array('value' =&gt; 'bar'),

),
),
@endcode

You can see state support value, but value is array, so can't use condition of value.
See the process states documentation page for more information