3 namespace Drupal\form_test\Form;
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Builds a form to test the required attribute.
11 class FormTestRequiredAttributeForm extends FormBase {
16 public function getFormId() {
17 return 'form_test_required_attribute';
23 public function buildForm(array $form, FormStateInterface $form_state) {
24 foreach (['textfield', 'textarea', 'password'] as $type) {
41 public function submitForm(array &$form, FormStateInterface $form_state) {