| 6 email_example.module | email_example_form() |
| 7 email_example.module | email_example_form() |
| 8 email_example.module | email_example_form() |
The contact form.
Related topics
1 string reference to 'email_example_form'
File
- email_example/
email_example.module, line 171 - Example of how to use Drupal's mail API.
Code
function email_example_form() {
$form['intro'] = array(
'#markup' => t('Use this form to send a message to an e-mail address. No spamming!'),
);
$form['email'] = array(
'#type' => 'textfield',
'#title' => t('E-mail address'),
'#required' => TRUE,
);
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Message'),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
Login or register to post comments