public function MailingListSubscribeForm::buildForm in Mailgun 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 FormInterface::buildForm
File
- modules/
mailgun_mailing_lists/ src/ Form/ MailingListSubscribeForm.php, line 62
Class
- MailingListSubscribeForm
- Provides list subscription form.
Namespace
Drupal\mailgun_mailing_lists\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['email'] = [
'#type' => 'email',
'#title' => $this
->t('Email'),
];
$form['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Subscribe'),
];
return $form;
}