Depending on option selected non-relevant fields will be filled with black colour.
Hi
I'd really appreciate if someone could help me.
I already have a script that will automatically fill non relevant fields a black colour when the user selects 'Contractor' from the drop down options. However I need other fields to be filled black if the user selects the other drop option 'Team Member' such as Manager Name and Job Title fields, etc.
Can I add something to the below script to include this?
var fields = ["Currency", "Salary", "Sal Basis", "Salary R", "Sal Year", "Per", "Per F", "Pro Day", "Pro Mont", "Note Day", "Note Mont", "Per", "Company Car", "Car Allowance", "Fuel Card", "Fuel Allowance", "PlanType", "LocalBonus", "Sub Plan", "Annual Target", "Target Amount", "Healthcare", "Local Healthcare", "Life Insurance", "Employee", "Employer", "Charged Segment",];
//
for (var i in fields) {
var f = this.getField(fields[i]);
if (event.value!="Contractor") {
f.required = true;
f.fillColor = color.transparent;
f.readonly = false;
} else {
f.required = false;
f.fillColor = color.black;
f.readonly = true;
}
}
