What is the easiest way to change the css for a fi...
# general
p
What is the easiest way to change the css for a field? I have a field that is disabled based on a workflow and would like to change the background color and text color.
k
You can't without injecting into the DOM an unsupported action
j
I was able to pull this off in an inline HTML field. I'll post the small piece of code I used
CASE WHEN {fieldid} = 'Your Value' THEN  '<div style="color:white;background-color:#28B463; width: 250px; text-align: center; margin-top: 13px; border-style: solid; border-color: black;"><font size="+2"><b>' || {fieldid} || '</b></font></div>' ELSE '<div style="color:white;background-color:#2E86C1; width: 250px; text-align: center; margin-top: 13px; border-style: solid; border-color: black;"><font size="+2"><b>' || {fieldid} || '</b></font></div>' END
k
You can change it if it's an HTML field, but the user can't do anything with it.
Disabling it based on a workflow tells me sometimes it's not disabled, which is why I tossed the idea of an HTML field out.
That said, man, I just thought of a great use for that with customer statuses.
Though, I suppose a two tierd approach with a inline HTML field and the real field could accomplish same results.
j
yeah my fields are just indicators for sales reps, so no functionality needed from those.
great for reporting as well.