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.