3 namespace Drupal\form_test\Form;
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Builds a simple form to test the #group property on #type 'container'.
11 class FormTestDetailsForm extends FormBase {
16 public function getFormId() {
17 return 'form_test_details_form';
23 public function buildForm(array $form, FormStateInterface $form_state) {
26 '#title' => 'Details element',
29 $form['submit'] = ['#type' => 'submit', '#value' => 'Submit'];
36 public function validateForm(array &$form, FormStateInterface $form_state) {
37 $form_state->setErrorByName('meta', 'I am an error on the details element.');
43 public function submitForm(array &$form, FormStateInterface $form_state) {