Download & Extend

Different color background of rows depending on a particular field

Project:Webform Report
Version:6.x-2.0
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Sometimes people want to see overall result at first sight.

It would be a tremendous advance to be able to have rows coloured depending on any particular field's values. A simple example: having a field "urgent" and making any row with an "urgent" field to 1 appear with a different background color.

Comments

#1

Title:Different color of rows depending on a particular field» Different color background of rows depending on a particular field

#2

You could probably do this with the PHP Code option under Report Criteria - something like:

<?php
foreach($rows as $i => $row) {
 
// check for our value in the eight report column
 
if ($row[8]['data'] == 'two') {
    foreach (
$row as $j => $cell) {
     
$rows[$i][$j]['style'] = 'background-color:#FF0000;';
    }
  }
}
?>
nobody click here