This topic is locked

conditional formatting comparing two fields values

10/15/2015 10:10:39 AM
PHPRunner General questions
L
LandonH author

I need to evaluate several fields values and place condition based on their value.
Like if [ Date fields] => Now then

.....
Else if

[Status field] =='comp'

.....
****

I am able to use custom settings to evaluate a single fields value and place some condition see the below.

Code

if ($value >= now()) {
$value = $value. ' <img src="./images/green.png" alt="" />';
$color="black";
} else {
$value ='<strong>'.$value. '</strong> <img src="./images/red.png" alt="" />';
$color="red";

}
$value="<span style='color: " . $color . ";'>".$value."</span>";

**End Code***

Sergey Kornilov admin 10/15/2015

Where do you put all this code?

L
LandonH author 10/15/2015



Where do you put all this code?


I go to the field properties and then go to custom. Code goes their.

Sergey Kornilov admin 10/15/2015

According to the manual you can access any other field value as $data["FieldName"]:

http://xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm