expo get-email form improved

This commit is contained in:
2021-09-08 15:51:46 +02:00
parent ccf9e91313
commit dafad8f276
5 changed files with 48 additions and 9 deletions

View File

@@ -33,24 +33,44 @@ class GetEmail extends FormBase {
$url = Url::fromRoute('materio_expo.qr_controller_getfile', ['ref'=>$ref], ['absolute' => TRUE]);
return new RedirectResponse($url->toString());
}else{
$form['heading'] = [
'#type' => 'html_tag',
'#tag' => 'h3',
'#value' => $this->t("Thank you for stopping by at matériO's bOOth."),
'#weight' => '0',
];
$form['welcome'] = [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => $this->t("In order to visualize the information of the exhibited materials, could you indicate your e-mail address?"),
'#weight' => '1',
];
$form['email'] = [
'#type' => 'email',
// '#title' => $this->t('Email'),
'#attributes' => [
'placeholder' => $this->t('Email')
],
'#weight' => '0',
'#weight' => '2',
];
$form['ref'] = [
'#type' => 'hidden',
'#value' => $ref
];
$form['submit'] = [
'#type' => 'submit',
'#value' => $this->t("Submit"),
$form['actions'] = [
'#type' => 'container',
'#weight' => '3',
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t("Go!")
];
return $form;
}
}