Limitation for checkbox/radio widget

Created on 28 December 2023, over 1 year ago

Problem/Motivation

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 checkboxes/radio buttons but also extends to list text fields.

Steps to reproduce

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.

Proposed resolution

Use hook_field_widget_single_element_form_alter to change the element type.

πŸ“Œ Task
Status

Active

Version

3.0

Component

User interface

Created by

πŸ‡΅πŸ‡­Philippines madelyncruz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024