is it possible to add a select all option? Or does it already exist and I've missed it?

Many thanks,

CommentFileSizeAuthor
#5 select_all-1547220-5.patch3.77 KBdeciphered

Comments

moniuch’s picture

I would welcome such an option too, but we should distinguish 2 flavors of such a feature:

  1. Select All that is a front-end helper link that selects all terms available at a given moment - applicable only for checkbox mode, and with no limit set. If new terms appear, they will not be selected unless manually added. This option would be even more handy, if we could optionally render such a link out to the anonymous user on live site. Or at least, provide an access to a JavaScript method that performs select all and allows developer to program their own Select All link.
  2. Select All that is a special selection state that means * - i.e. whatever options are available at the moment you happen to view the tree, it means them all. If new term appear, they will automatically be included. It should be a checkbox and once checked, should disable the entire tree. That one would be useful for flagging entities as global for the vocabulary (say, a distributor that can handle all defined regions, now and in the future).
Hitby’s picture

Interesting, I hadn't thought about your option 2 but it does sound useful and would in fact be the option I would choose for my current project.

francoud’s picture

Issue summary: View changes

Any news about this feature?

Greg Varga’s picture

Would be very interested to see this implemented, especially option 2.

deciphered’s picture

Status: Active » Needs review
StatusFileSize
new3.77 KB

Attached patch provides the simple functionality of option 1. While I see the benefit of option 2, I think that it could be extremely confusion for the user and would require a much more explanation so that users are aware that future terms will automatically be appended to the list, which isn't always going to be the desired behaviour.

Note: I kept the coding standards of both the PHP and JS modifications and patterns in line with the existing code, as the existing code isn't currently Drupal coding standards compliant and felt that it is the best route to take, as such, please limit the review to the functionality rather than coding standards.

vladimiraus’s picture

Status: Needs review » Closed (outdated)

Thank you everyone for your contribution.
Drupal 7 is no longer supported but we always need support for Drupal 11 version.
Closing as outdated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.