public function SendDefaultForm::buildForm in Mail Safety 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfirmFormBase::buildForm
File
- src/
Form/ SendDefaultForm.php, line 60
Class
- SendDefaultForm
- Class SendDefaultForm.
Namespace
Drupal\mail_safety\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $mail_safety = NULL) {
$config = \Drupal::config('mail_safety.settings');
$this->mailSafety = $mail_safety;
$form['to'] = [
'#type' => 'textfield',
'#title' => t('Send to another address'),
'#description' => t('Only use this field if you want the e-mail to go to an address other than the default address.'),
'#default_value' => $config
->get('default_mail_address'),
];
return parent::buildForm($form, $form_state);
}