This topic is locked

Changing cell background color if checkbox checked

3/7/2008 11:55:42 AM
PHPRunner General questions
A
axelwing author

Hello,
Is there a way (it is, of course but I do not know it...) to change a cell bg color if a checkbox in that cell is checked or not?

As an example:
I have a checkbox which shows if an event is validated. Before validation, the checkbox is not checked so the cell bg color is green. After check, the cell bg color becomes red, so the user knows that he don't need to update anything in that record.
Thank you very much for your help.
Regards,

Axel.

J
Jane 3/11/2008

Axel,
you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.

Here is a sample:

if ($value)

$value = "<table width=100% bgcolor=red><tr><td><img src="images/check_yes.gif" border=0></td></tr></table>";

else

$value = "<table width=100% bgcolor=green><tr><td><img src="images/check_no.gif" border=0></td></tr></table>";

A
axelwing author 3/11/2008

Axel,

you can do it using Custom format on the "View as" settings dialog on the Visual Editor tab.

Here is a sample:


Thank you very much, I really appreciate this!
Axel.