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

True

 

if (g_form.setValue('select_all')==true)

{

g_form.setValue('domain_01',true);

g_form.setValue('domain_02',true);

g_form.setValue('domain_03',true);

.

.

 

}

else

{

g_form.setValue('domain_01',false);

g_form.setValue('domain_02',false);

g_form.setValue('domain_03',false);

.

.

}


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

Ok Thanks for thinking of it all the way through.  This is what I have but it is not selecting all so I think I have not set it up correctly.  Is the Table correct?

 

find_real_file.png

 

In the client script select the Field Name as Select All.

 

Also make sure select_all,domain_01 are the exact variable name. I gave you a sample assuming those are the variables name

 


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

Ok I see I was not creating the client script in the right place so now I have this and it will not let me check the select All box at all.  Any idea why?

 

find_real_file.png

 

Correct this line

if (g_form.getValue('select_all')=='true')


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