This topic is locked

Conditional Formatting not working

11/19/2015 4:29:43 PM
PHPRunner General questions
B
bencroftweb author

Hi all
I have looked over the tutorial several times but each time try to use conditional formatting it breaks the build
I get this error; Parse error: syntax error, unexpected 'color' (T_STRING) in /var/www/html/include/phpfunctions.php on line 741
You can see if you visit dcs.loginonline.com for a short while.
Where am I going wrong? I literally copied the example over and it still errors.
Thanks
Ben

Sergey Kornilov admin 11/19/2015

What is your exact code and where do you put it? What version of PHPRunner you applying it to?
Also, where do you copy this code from? If there is some sort of mistake in sample code we'll need to fix it.

B
bencroftweb author 11/19/2015



What is your exact code and where do you put it? What version of PHPRunner you applying it to?
Also, where do you copy this code from? If there is some sort of mistake in sample code we'll need to fix it.


Hi Admin
I'm running Enterprise 8.0 Build 23092 x64
The example I cut and paste from the tutorial at http://xlinesoft.com/blog/2011/01/03/tutorial_conditional_formatting/ is:
if ($value < 0) {

$color="black";

} else {

$color="red";

}

$value="<span style="color: &quot; . $color . &quot;;">$value</span>";
When I check syntax I get:
unexpected 'color' (T_STRING....
and the last line underlines red.
Thanks
Ben
Sorry - forgot to mention weblink is dcs.loginonline.co.uk and I'm placing this code in the custom option on the properties of the selected field

Sergey Kornilov admin 11/19/2015

Thanks, Wordpress was breaking the code, I have updated that blog post with proper code.