- Issue created by @madelyncruz
- Status changed to Needs review
11 months ago 12:40pm 28 December 2023 - Merge request !9Issue #3411187: Checkbox/radio widget shows multiple selections even though it should only allow one → (Open) created by madelyncruz
I have a taxonomy entity reference field where the settings are set to unlimited values, while the third-party setting limits it to 1. It works as expected with the select form widget, but it doesn't work with the checkboxes/radio buttons form widget. The selection continues to allow for multiple choices. This issue persists not only with taxonomy fields, but also extends to list text fields.
1) Create a taxonomy entity reference field.
2) Set the field settings "Allowed number of values" to unlimited.
3) Save.
4) Edit the field again, then set the "Allowed number of values (Cardinality Instance)" limit to 1.
5) Save.
Use hook_field_widget_single_element_form_alter
to change the element type from checkboxes to radios.
Needs review
3.0
Code