- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2015 02:57 PM
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?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2015 09:13 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2015 07:37 AM
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");
}
}
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2015 09:35 AM
That's great, thank you so much!