You are here

public function LongIdForm::buildForm in CAPTCHA 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/captcha_long_form_id_test/src/Form/LongIdForm.php, line 23

Class

LongIdForm
Class LongIdForm.

Namespace

Drupal\captcha_long_form_id_test\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['text_field'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Text Field'),
    '#maxlength' => 64,
    '#size' => 64,
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => $this
      ->t('Submit'),
  ];
  return $form;
}