Single checkbox (or button) to select all lists

Solutions for other advanced phplisters

Single checkbox (or button) to select all lists

Postby Chuck » 7:09pm, Mon 23 Mar, 2009

Princeton University Press is about to convert its email service for announcing the publication of new books from an old Perl program I wrote many years ago to PHPList. We let our users select their areas of interest from a list of about 50 subject areas and most pick only a few. But some--such as librarians and book store staff--often want to subscribe to all of the subjects and resent having to click 50 separate check boxes. This should require no more than a minor hack of the subscriber page (which we have customized), but my JavaScript skills are rusty and I am pressed for time to relearn what I would need to accomplish it. Someone else must have done this or something very close to it and be willing to share the code.

I see two approaches: (1) add a checkbox for "all subjects" and add a function to the checkform routine that would check whether the "all" box had been selected and, when true, would tell the database that every checkbox was to be selected. Or (2) add a submit-type button that, when clicked, would check every box. Either way should not be too hard but is beyond my capability right now. Can anybody help? I'm just looking for JavaScript to insert into my custom html page; I'm not thinking of modifying the PHP code.

If anyone wants to look at the page--which we have not yet launched on our site--it's at press.princeton.edu/lists/enotice1.html

--Chuck Creesy, Princeton University Press
Chuck
phpList newbie
 
Posts: 3
Joined: 7:18pm, Fri 20 Mar, 2009

Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 3 guests