| Index
» Projekty
» phpMyEdit
» Fórum
» Conditional formatting |
 |
jbarne
Založený: 19.12.2008
Príspevky: 3
Zaslal: 2009-03-26 06:44
Návrat hore
Odpovedať s citátom
|
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:
| Kód: |
| '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
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-03-28 14:42
Návrat hore
Odpovedať s citátom
|
Add to your field array:
|
jbarne
Založený: 19.12.2008
Príspevky: 3
Zaslal: 2009-03-28 16:57
Návrat hore
Odpovedať s citátom
|
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
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-03-28 18:24
Návrat hore
Odpovedať s citátom
|
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
Založený: 19.12.2008
Príspevky: 3
Zaslal: 2009-03-29 20:02
Návrat hore
Odpovedať s citátom
|
Thanks Doug! I will try that!
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|