'Select all' on checkbox inputs
Is it possible to add a 'Select all' box to a DCA checkbox field that is displayed in the frontend?
Specifically I'm talking about the registration module, that uses the tl_member DCA. I've added some checkboxes to this, but as there are quite a few I need a 'Select all' box that will save the user from having to potentially click a lot of checkboxes.
I know I could just include a 'Select all' option for my checkboxes, but I don't want it to be an actual option.
Thank you
Re: 'Select all' on checkbox inputs
I would probably use a JavaScript solution for this. You could add a button/link/checkbox this way, and then loop through and check all the other boxes when it's clicked. So in other words, not really using Contao at all but just a little MooTools/jQuery snippet.
Re: 'Select all' on checkbox inputs
Yup, I think so, too. There are probably tutorials over the net.
Re: 'Select all' on checkbox inputs
Thanks for the suggestions. I also arrived at the same solution. In the end I injected the extra checkbox option using jQuery, then set on click event that checked or unchecked all the other boxes in the fieldset.
I just wanted to make sure there was no other way of doing this by manipulating the DCA or something.