I would like to create a "Select All" check box at the bottom of a list of check boxes in my catalog item. What is the best way to do this?

Cinlin
Giga Expert

Here is the list.

find_real_file.png

12 REPLIES 12

Brian Lancaster
Tera Sage

Create a select all checkbox and then create an on change client script that set all the other check boxes to true or false depending on if the value of select all is true or false.

 

I would suggest doing it like this.

On Change script.

g_form.setValue('domain_01',newValue);

g_form.setValue('domain_02',newValue);

g_form.setValue('domain_03',newValue);

 

Thais will allow you to check or un-check the boxes base on the Select All being checked or un-checked without having to worry about if statements.

SanjivMeher
Kilo Patron
Kilo Patron

You can just add a checkbox variable 'Select All'

 

And add an onChange Client script on Select All variable, which should check if Select All is True, then do

g_form.setValue('domain_01',true);

g_form.setValue('domain_02',true);

g_form.setValue('domain_03',true);

.

.

.

.

.


Please mark this response as correct or helpful if it assisted you with your question.

Yes but if the user then decides that they do not what select all and un-check it should set all the check boxes to false.