You are here

public function Example2::buildForm in Multiple forms 8

.

Overrides FormInterface::buildForm

File

multiform_example/src/Form/Example2.php, line 24
Contains \Drupal\multiform_example\Form\Example2.

Class

Example2

Namespace

Drupal\multiform_example\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['text_field_2'] = array(
    '#type' => 'textfield',
    '#title' => 'Text field 2',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Save',
  );
  $form['delete'] = array(
    '#type' => 'submit',
    '#value' => 'Delete',
    '#submit' => array(
      '::multiformTestDelete',
    ),
  );
  return $form;
}