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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

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

ListboxField not showing disabled values


Go to End


1327 Views

Avatar
SilverstripeLearner

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 ?