Hi Mathilda,
After working and adding code, I figured out that:
1- The HTML block with the code is adding 1 column.
2- It's not possible to have 2 HTML blocks.
=> It means that on 1 DataPage, we CAN'T color more than 1 field/Column. I would like to color several fields/columns depending on values.
For example, I would I have several columns like: Name, Sex, Age, Income and to color the text of 1 cell depending on the conditions.
Please see below my code :
<div id="mydiv[@field:Agent_ID#]"> </div>
<SCRIPT LANGUAGE="JavaScript">
if ("[@field:Agent_Sex]" == "M"){ document.getElementById("mydiv[@field:Agent_ID#]").innerHTML ="<span style='color:blue;'> [@field:Agent_Sex] </span>"; }
else{ document.getElementById("mydiv[@field:Agent_ID#]").innerHTML ="<span style='color:pink;'> [@field:Agent_Sex] </span>"; }
</SCRIPT>
I would like a code that DO NOT add a column or if I can have several checks on several columns.
Is it possible to create a code in footer or in the wordpresspage?
Thanks
Dorian