I’m a junior programmer who is fairly new to zend-expressive.
I have a zend-form with a Select dropdownlist with multiple set, I also wanted to be able to search through the list.
I run into an issue where the framework was stripping away the attribute (‘searchable’) from the form Select element, because it was not listed as a part of the zend-form SelectForm.php:
protected $validSelectAttributes = [
‘name’ => true,
‘autocomplete’ => true,
‘autofocus’ => true,
‘disabled’ => true,
‘form’ => true,
‘multiple’ => true,
‘required’ => true,
‘size’ => true,
When I add the searchable attribute directly to the files in the framework like this (‘searchable’ => true). It works, but that is breaching the OOP principle of encapsulating and hiding properties by declaring them private. I tried to create a custom select from the Element\Select, but there is no method to addValidSelectAttributes.
Is there away to do this easily in Zend?
Thanks for your help.