| Index
» Projects
» phpMyEdit
» Forum
» Conditional formatting |
 |
jbarne
Joined: 19 Dec 2008
Posts: 3
Posted: 2009-03-26 06:44
Back to top
Reply with quote
|
Dear forum!
I have a table with a colour field and I want to colorize that cell with the colour itself.
On this forum this is discussed in similar threads before. Most of them suggest using the sql option. I am therefore trying something like:
| Code: |
| 'sql|L' => 'CONCAT("<span style=color:", colour,">", colour, "</span>")' |
However this does not work. Instead of the <span> tag I get <span> instead. I do not know how the sql option work in reality so I have no clue on how to solve the problem.
I also thought that the php option might work. However it seems impossible to retrieve the field value from the core class as in $this->fdd->colour->value or similar. Is that really correct?
Grateful for any help on this.
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-03-28 14:42
Back to top
Reply with quote
|
Add to your field array:
|
jbarne
Joined: 19 Dec 2008
Posts: 3
Posted: 2009-03-28 16:57
Back to top
Reply with quote
|
Thanks a lot Doug for helping me out, even though I can see that it is in the documentation. I just did not understand it. That solved it for me!
Out of interest for next time: Understanding the code in the phpMyEditSetup.php file is way over my head to understand, BUT when print_r(this) in a trigger file I do not see the field value anywhere.
So... is the actual field value available in the core class?
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-03-28 18:24
Back to top
Reply with quote
|
Try the dBug script from
http://dbug.ospinto.com/
See the "Trigger variables" heading at
http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.triggers.html
|
jbarne
Joined: 19 Dec 2008
Posts: 3
Posted: 2009-03-29 20:02
Back to top
Reply with quote
|
Thanks Doug! I will try that!
|
|
Post new topic
Reply to topic
|
|
|
|