'Select All' option

Created on 21 June 2019, about 6 years ago
Updated 3 July 2025, 2 days ago

I've been trying to figure out how to implement a "select all" functionality in select2 module.
It would be helpful in multiselect lists where you often have to pick all option (eg: select all cantones of a region).
Shift+click and ctrl+a do not work.

I checked the select2_publish module for inspiration on how to adapt the module to my needs using JS but I can't say it took me anywhere.

Any ideas?
Thanks

πŸ’¬ Support request
Status

Needs work

Version

1.0

Component

User interface

Created by

πŸ‡¬πŸ‡·Greece bserem

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.

  • πŸ‡ΊπŸ‡ΈUnited States robpowell Boston

    This is great! I think one feature it is missing is to be able to control which fields you add the select all button to. This could be achieved by updating the field widget with a check box "Show select all" and then update the JS to only show when that field setting is set.

Production build 0.71.5 2024