I'm building a form that contains a select
but it's not rendering as a dropdown. It's rendering with a scrollbar and a dropdown down arrow
$form['my_select'] = [
'#type' => 'select',
'#empty_option' => '- None -',
'#title' => $this->t('My Select'),
'#options' => ['Option1', 'Option2'],
'#size' => 6,
'#weight' => '0',
];
What am I doing wrong?