public function VerifyPhoneNumberForm::buildForm in SMS Framework 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
- src/
Form/ VerifyPhoneNumberForm.php, line 63
Class
- VerifyPhoneNumberForm
- Form to accept a verification code.
Namespace
Drupal\sms\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['code'] = [
'#title' => $this
->t('Verification code'),
'#description' => $this
->t('Enter the code you received from a SMS message.'),
'#type' => 'textfield',
'#required' => TRUE,
];
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => t('Verify code'),
'#button_type' => 'primary',
];
return $form;
}