Drupal Association members fund grants that make connections all over the world.
I have a form field that is conditionally required depending on another field's value. Using Form API:
$form['details_' . $method['provider'] . '_' . $code]['lastname'] = array( '#type' => 'textfield', '#title' => t('Last Name'), '#disabled' => $disabled, '#states' => array( 'visible' => array(':input[name="method"]' => array('value' => $code)), 'required' => array(':input[name="method"]' => array('value' => $code)) ), );
The field shows up as required, but somehow fails to respect clientside validation?