function sms_user_form_alter in SMS Framework 7
Implements hook_form_alter().
File
- modules/
sms_user/ sms_user.module, line 690 - Provides integration between the SMS Framework and Drupal users.
Code
function sms_user_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == "user_register_form") {
if (variable_get('sms_user_registration_form', 0)) {
$form['sms_user'] = array(
'#type' => 'fieldset',
'#title' => t('Mobile settings'),
'#description' => t('You will receive a message to confirm your mobile information upon login.'),
'#collapsible' => TRUE,
'#tree' => TRUE,
);
$required = FALSE;
if (variable_get('sms_user_registration_form', 0) == 2) {
$required = TRUE;
}
$form['sms_user'] += sms_send_form($required);
$form['sms_user']['number']['#element_validate'] = array(
'sms_user_validate_number_element',
);
return $form;
}
}
return $form;
}