function multiple_email_add_form in Multiple E-mail Addresses 5
Builds form for adding a new email address
Parameters
object $account User object:
1 string reference to 'multiple_email_add_form'
- multiple_email_add_page in ./
multiple_email_add_page.inc - Renders the page for adding a new email address
File
- ./
multiple_email_add_page.inc, line 28 - Functions for the page to add a new email address to the registry.
Code
function multiple_email_add_form($account) {
$form['email'] = array(
'#type' => 'textfield',
'#title' => t('Email Address'),
'#required' => true,
);
$form[] = array(
'#type' => 'submit',
'#value' => t('Register'),
);
$url = base_path() . 'my-email-addresses';
$form[] = array(
'#type' => 'button',
'#value' => t('Cancel'),
'#submit' => false,
'#attributes' => array(
'onclick' => "window.location='{$url}';return false;",
),
);
return $form;
}