Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ListboxField not showing disabled values

Go to End



Community Member, 15 Posts

27 May 2017 at 1:52am

I have the following field:

 ListboxField::create('ArrayValues', 'ArrayValues:')->setMultiple(true)->setSource($formatted_data)->addExtraClass

in the $formatted_data variable I stored the values I want to disable. The problem is when i want to select from my dropdown I want to see
those disabled values.

After doing some research with the browser's inspector, I noticed that there is a select that it's actually hidden, and the <option> tags inside have
the correct disabled attribute AND SilverStripe actually displays those whithin an ul and somehow this ul in linked with the select.

Anyway, does anyone know what I can do to still be able to see those disabled values ?