This topic is locked

Adding Colors to a Row based on a condition

6/16/2009 9:27:40 AM
PHPRunner General questions
T
thecomputerguy author

use "List page: After record processed" event on the Events tab for this purpose.

Here is a sample:

---------------------------------

if ($data["Complete"]=="Y")

$record["headerclass"] = "style=\"background: red;\"";

---------------------------------
Then proceed to the Visual Editor tab, switch to HTML mode, find this code:

---------------------------------

<TD class=grid_recordheader colSpan=2>

---------------------------------

and replace it with this one:

---------------------------------

<TD class=grid_recordheader colSpan=2 {$headerclass}>

---------------------------------
thank you Jane for the Info. Worked perfect!

C
christwigg74 6/18/2009

use "List page: After record processed" event on the Events tab for this purpose.

Here is a sample:

---------------------------------

if ($data["Complete"]=="Y")

$record["headerclass"] = "style=\"background: red;\"";

---------------------------------
Then proceed to the Visual Editor tab, switch to HTML mode, find this code:

---------------------------------

<TD class=grid_recordheader colSpan=2>

---------------------------------

and replace it with this one:

---------------------------------

<TD class=grid_recordheader colSpan=2 {$headerclass}>

---------------------------------
thank you Jane for the Info. Worked perfect!


Hi Thanks for your speedy reply!
I cannot find <TD class=grid_recordheader colSpan=2> in my HTML code or anything with a colspan ??
what version are you using
Many thanks for all your efforts

T
thecomputerguy author 6/19/2009

go back to the Edit of the page. view the HTML code.
What i have done is before you go to the HTML section click where you want to start i usually clicked at the begining of the section you want to add the color.
Then switch to the HTML code and right there at the beginning of the TD put the above code.
I hope that helps.
version 5.1 build 2181
thank you,
Andrew