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 FormTestGroupContainerForm extends FormBase {
16 public function getFormId() {
17 return 'form_test_group_container';
23 public function buildForm(array $form, FormStateInterface $form_state) {
24 $form['container'] = [
25 '#type' => 'container',
29 '#title' => 'Group element',
31 '#group' => 'container',
33 $form['meta']['element'] = [
34 '#type' => 'textfield',
35 '#title' => 'Nest in details element',
43 public function submitForm(array &$form, FormStateInterface $form_state) {