This topic is locked

Text color depending on entry

3/1/2007 5:08:50 AM
PHPRunner General questions
M
mmponline author

I have a field for active and inactive to be used by admin.
When the field is active (Yes) I want the text Yes to appear in Green

When the field is inactive (No) I want the text No to appear in Red.
How do I do this?

Alexey admin 3/1/2007

Stephan,
use Custom view type.

Here is the sample code:

if($value=="Yes")

$value="<font color=green>Yes</font>";

else if($value=="No")

$value="<font color=red>No</font>";

M
mmponline author 3/1/2007

Spot on, like always!
Thank you!