You are here

function sms_user_settings_add_form in SMS Framework 7

Same name and namespace in other branches
  1. 5 modules/sms_user/sms_user.module \sms_user_settings_add_form()
  2. 6.2 modules/sms_user/sms_user.module \sms_user_settings_add_form()
  3. 6 modules/sms_user/sms_user.module \sms_user_settings_add_form()

Form constructor for the user number confirmation request form.

Parameters

object $account: The user account object.

See also

sms_user_settings_add_form_validate()

sms_user_settings_add_form_submit()

1 string reference to 'sms_user_settings_add_form'
sms_user_settings in modules/sms_user/sms_user.module
Menu callback for user profile settings form.

File

modules/sms_user/sms_user.module, line 287
Provides integration between the SMS Framework and Drupal users.

Code

function sms_user_settings_add_form($form, &$form_state, $account) {

  // Use SMS Send form for 'number' and 'gateway' fields.
  $form = sms_send_form(TRUE);

  // Add element validation for number.
  $form['number']['#element_validate'][] = 'sms_user_validate_number_element';
  $form['uid'] = array(
    '#type' => 'hidden',
    '#value' => $account->uid,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Confirm number'),
  );
  $form['#submit'][] = 'sms_user_settings_add_form_submit';
  return $form;
}