var field_div = document.getElementsByName("name")[0];
var label = field_div.getElementsByClassName("sys_f_label")[0];
// some logic here to decide color
label.style.color = "red";
This code gets the div that contains all of the field's components, and then retrieves the element inside that div with the class the client uses for styling labels.
Eli
var field_div = document.getElementsByName("name")[0];
var label = field_div.getElementsByClassName("sys_f_label")[0];
// some logic here to decide color
label.style.color = "red";
This code gets the div that contains all of the field's components, and then retrieves the element inside that div with the class the client uses for styling labels.
Eli