Hello there,
I am attempting to re-create the lightning stage path with branching stages.
I built a Visualforce table with the bare-bones of these stages, but am running into trouble when I go to add conditional formatting.
When the stage of this custom object is changed, I would like for the cell color to change (reflecting the original stage path salesforce already provides)
Here is my code so far:
Is there a way to add the IF Statement within the style formatting conditional on the stage field?. When I have attempted to add it in, it gives me several different syntax errors.
Any help would be appreciated! :)
1 Answer
I would be interested to know exactly what sort of data your are trying to represent.
Having three header rows is fairly non standard. I would argue that depending on the UI that you are trying to construct, perhaps an arrangement of divs
might suit you better.
Anyway, to change the style of a particular div, you could do something like:
<th style="{! IF (stageName == 'Closed Won', 'background-color:red;','background-green;')}"></th>
It's been a while since I tried this, but I think you can use regular styles + an evaluated style like this:
<th style="text-align:center; font-size: 20px; {! IF (stageName == 'Closed Won', ' background-color:red; ',' background-green; ')}"></th>
stageName
is of course a property on the controller that you'd need to declare.
IF
markup that you've tried?