Accessing Value in Repeat Group of Detail in Table layout

milesreid

New Member
Hi
In a customisation of a detail layout for DOMPDF I am trying to color certain cells differently depending on the value of that cell, but am having difficulty in accessing the individual value for the column in each row. The rows are being rendered as a table.

In a table 'hazard_evaluation' with column 'initial_risk' I find that {hazard_evaluation___initial_risk} contains, as one would expect, an array of values of that column for both rows - in my test data 27,6

How can I access the value of the column in the PHP in default_repeat_group_row.php so that I can set the name of the CSS class as a PHP variable? The solution that I am trying to achieve is:

Code:
<div  class="fabrikElement  <?php echo $backgroundColorClass?>  ">
                <span ><?php echo $element->element;?></span>
            </div>

Attached is a screenshot of what I'm trying to achieve - the colours being dependent upon the value in the cell

TIA
Miles
 

Attachments

  • Screenshot Colored cells.jpg
    Screenshot Colored cells.jpg
    20 KB · Views: 22
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top