- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2018 05:42 AM
I have a group of individual checkbox variables, i want to add a red asterisk to the Label of the checkbox list..
I created a UI policy with conditions checking if the checkbox is not checked... In the advanced view i added the below script..
var mandatoryLabel = 'What Accessories are needed?';
//Get all of the LABEL tag elements and check for a matching label
$$('label').each(function(labels) {
if(labels.innerHTML.indexOf(mandatoryLabel) > -1){
//Set the 'mandatory' class name for the label element
labels.previousSibling.className = 'mandatory required-marker label_description';
}
});
I see error as Labels is undefined.
Solved! Go to Solution.
- Labels:
-
Service Portal Development