Problem/Motivation
It is possible to programatically disable individual options on a checkboxes widget with the intention to show the selected value to users but disallow deselection, but if you do so the previously stored value will be removed despite having been show to the user as selected.
This is split out from #2911473: Selected yet disabled individual options from checkboxes element don't persist through save which addresses this more generally at the FAPI level and should be fixed first.
Steps to reproduce
- Add a field to article, as follows:
- Field type: boolean
- Field label: My Field
- Save and continue
- Set number of values to unlimited
- Save field settings
- Leave all settings, and click Save settings
Proposed resolution
To be determined.
Remaining tasks
Diagnose.
Fix.
Add test.
User interface changes
None.
API changes
None.
Data model changes
None.