Display maximum number of allowed values and number already selected

Created on 16 April 2021, about 3 years ago
Updated 29 January 2023, over 1 year ago

Problem/Motivation

When selecting entities on the modal window, it would be very useful to see how many entities have been selected and how many more may be selected before reaching the limit.

The maximum number of allowed values for a field may be anywhere between 0 and unlimited. However, when the Entity Reference Tree Widget is used, the selection process is "blind" to this. The user only knows the limit has been reached when they can no longer select further entities by clicking them. Additionally when using this widget, the "Add another item" button is not shown on the form, so the user doesn't even know if the field can accept multiple values or not.

Proposed resolution

Change "Selected entities:" at the bottom the modal window to show the number of entities that have already been selected, and the maximum number that may be selected. For example:

"Selected (0 of 1 max): "

"Selected (2 of unlimited): "

"Selected (3 of 3 max): "

I think the word "entities" can be removed so that the line of text is simple and does not become too long. "Entities" is rather a technical word for many non-technical users, and not really necessary or user-friendly.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΉπŸ‡­Thailand Nick Hope

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024