Guest User

Untitled

a guest
Mar 18th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function arep_form_alter(&$form, &$form_state, $form_id) {
  2. if ($form_id == "user_register_form") {
  3. //field licence number is required only if profession is nurse
  4. $form['field_license_number']['#states'] = array(
  5. 'required' => array(
  6. ':input[name="field_profession[' . LANGUAGE_NONE . ']"]' => array(
  7. array('value' => t('8')),
  8. array('value' => t('9')),
  9. ),
  10. ),
  11. );
  12. }
  13. }
Add Comment
Please, Sign In to add comment