field/table cell background color
Posted: 13 Feb 2020
Hi there,
i have an "approval status drop down field" in a table cell. i would like to have 3 colors dynamically changed depending on the status
Approved - green
Pending - yellow
Reject - red
I tried the following code... it works but it chnges only title and element itself, i would like to change background for the cell where the dropbox item is placed instead
function EntryHandler() {
if (!fd.field('ApprovalStatus').value()) {
fd.field('ApprovalStatus').title()._el().addClass('highlight');
fd.field('ApprovalStatus').control()._el().addClass('highlight');
} else {
fd.field('ApprovalStatus').title()._el().removeClass('highlight');
fd.field('ApprovalStatus').control()._el().removeClass('highlight');
}
}
fd.field('ApprovalStatus').change(function()
{
EntryHandler();
});
EntryHandler();
Your help is greatly appreciated...
i have an "approval status drop down field" in a table cell. i would like to have 3 colors dynamically changed depending on the status
Approved - green
Pending - yellow
Reject - red
I tried the following code... it works but it chnges only title and element itself, i would like to change background for the cell where the dropbox item is placed instead
function EntryHandler() {
if (!fd.field('ApprovalStatus').value()) {
fd.field('ApprovalStatus').title()._el().addClass('highlight');
fd.field('ApprovalStatus').control()._el().addClass('highlight');
} else {
fd.field('ApprovalStatus').title()._el().removeClass('highlight');
fd.field('ApprovalStatus').control()._el().removeClass('highlight');
}
}
fd.field('ApprovalStatus').change(function()
{
EntryHandler();
});
EntryHandler();
Your help is greatly appreciated...