- πΊπΈUnited States codechefmarc
Yes, I've gotten it to work like this:
$form['my_tabs'] = [ '#type' => 'horizontal_tabs', ]; $form['tab_content'] = [ '#type' => 'details', '#title' => $this->t('Tab Content'), '#open' => TRUE, '#group' => 'my_tabs', ]; $form['another_tab'] = [ '#type' => 'details', '#title' => $this->t('Another Tab'), '#group' => 'my_tabs', ]; $form['tab_content']['my_field'] = [ '#type' => 'textfield', '#title' => $this->t('An awesome textfield'), ];
- Status changed to Closed: works as designed
10 months ago 8:25pm 1 June 2024 - π§πͺBelgium nils.destoop
You can idd use the elements in custom forms. But you should use the correct types like shown in #3.