Does anyone know if there is a way to set the value of a field with states?
E.g. If "this" is checked, set input value to "0"
Something like....
$form['booking_process'] = array(
'#type' => 'textfield',
'#states' => array(
'value["0"]' => array(
'select[name="field_relation[und]"]' => array('checked' => true),
),
),
);
I always do this with my own JS, just wondered if there was a feature in states I was missing?