$type, '#required' => TRUE, '#title' => $type, ]; } $form['submit'] = [ '#type' => 'submit', '#value' => 'Submit', ]; return $form; } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { } }