Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function arep_form_alter(&$form, &$form_state, $form_id) {
- if ($form_id == "user_register_form") {
- //field licence number is required only if profession is nurse
- $form['field_license_number']['#states'] = array(
- 'required' => array(
- ':input[name="field_profession[' . LANGUAGE_NONE . ']"]' => array(
- array('value' => t('8')),
- array('value' => t('9')),
- ),
- ),
- );
- }
- }
Add Comment
Please, Sign In to add comment