function sms_user_opt_out_form in SMS Framework 7
Form constructor for the user opt out form.
Parameters
object $account: The user account object.
See also
sms_user_opt_out_form_submit()
1 string reference to 'sms_user_opt_out_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 546 - Provides integration between the SMS Framework and Drupal users.
Code
function sms_user_opt_out_form($form, &$form_state, $account) {
$form['uid'] = array(
'#type' => 'hidden',
'#value' => $account->uid,
);
$form['opt_out'] = array(
'#type' => 'fieldset',
'#title' => t('Opt Out'),
'#collapsible' => TRUE,
);
$form['opt_out']['sms_user_opt_out'] = array(
'#type' => 'checkbox',
'#title' => t('Opt out of sms messages from this site.'),
'#description' => t('If enabled, you will not receive messages from this site.'),
'#default_value' => isset($account->sms_user['sms_user_opt_out']) ? $account->sms_user['sms_user_opt_out'] : NULL,
);
$form['opt_out']['set'] = array(
'#type' => 'submit',
'#value' => t('Set'),
);
return $form;
}