Description

__construct(string $name, array $values = null, mixed $selected = null, bool $multipleSelection = false, string $class = 'inputDropdown', string $classError = 'inputDropdownError')

Class constructor.

Parameters

string $name
The name.
array $values = null
The possible values. Each value should have a label and value-key.
mixed $selected = null
The selected value.
bool $multipleSelection = false
Can multiple elements be selected?
string $class = 'inputDropdown'
The CSS-class to be used.
string $classError = 'inputDropdownError'
The CSS-class to be used when there is an error.

Comments

Pieter wrote 1 year ago

Is there a way to set optgroups?

Comment