$form['example_select'] = [
'#type' => 'select',
'#title' => $this->t('Select element'),
'#options' => [
'1' => $this->t('One'),
'2' => [
'2.1' => $this->t('Two point one'),
'2.2' => $this->t('Two point two'),
],
'3' => $this->t('Three'),
],
];
Like this:
Like Loading...
Related Posts