Client Script to get ALL Catalog Variable values

ljschwaberow
Giga Expert

I am looking for a some coding help...as this is not my strong suit. I am using a Catalog Item to display different System Access variables in   check box variables. We are building templates of what should be set to true for each employee based on their position. Those defaulted 'true' check boxes we are wanting to highlight. I've been able to do all of this so far by hard coding:

g_form.setValue('variable_name'), true;

g_form.getControl('variable_name;).parentNode.style.backgroundColor = 'LightBlue';

I would rather not hard code each variable name to highlight when the variable is 'true'. Could anyone help me with how to reference all the variables, see which ones are true and then highlight those? Is this even possible or is hard coding the only way to go?

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

This would work now in Fuji ..



jQuery('input[type=checkbox].cat_item_option:checked').each(function(){


(jQuery(this).parent().parent().css( "background-color", "LightBlue"));


}


);



But future upgrades , I am not sure


View solution in original post

6 REPLIES 6

Haven't tested it but try once



jQuery('select.cat_item_option').each(function(){


if(this.value != 'standard_choice')


{


jQuery("label[for='"+this.id+"']").css( "background-color", "LightBlue");


}


}


);


That's great, thank you so much!