function multiple_email_confirm_form in Multiple E-mail Addresses 5
Same name and namespace in other branches
- 6 multiple_email_confirm_page.inc \multiple_email_confirm_form()
- 7 multiple_email_confirm_page.inc \multiple_email_confirm_form()
- 2.x multiple_email_confirm_page.inc \multiple_email_confirm_form()
Builds email confirmation form
Parameters
object $email:
string $confirm_code:
Return value
array
See also
multiple_email_confirm_form_submit()
1 string reference to 'multiple_email_confirm_form'
- multiple_email_confirm_page in ./
multiple_email_confirm_page.inc - Renders the page to confirm an email address
File
- ./
multiple_email_confirm_page.inc, line 54 - Functions for displaying and processing the confirmation page
Code
function multiple_email_confirm_form($email, $confirm_code) {
$form['eid'] = array(
'#type' => 'hidden',
'#value' => $email->eid,
);
$form[] = array(
'#prefix' => '<p>',
'#value' => t("The email address '%email' is awaiting confirmation. You should have received an email at that address with a confirmation code in it. Enter the code below and click confirm.", array(
'%email' => $email->email,
)),
'#suffix' => '</p>',
);
$form['code'] = array(
'#type' => 'textfield',
'#title' => t('Confirmation Code'),
'#required' => true,
'#default_value' => $confirm_code,
);
$form['confirm'] = array(
'#type' => 'submit',
'#value' => 'Confirm',
);
$url = base_path() . 'my-email-addresses';
$form['cancel'] = array(
'#type' => 'button',
'#value' => 'Cancel',
'#attributes' => array(
'onclick' => "window.location='{$url}'; return false;",
),
);
return $form;
}