Field in a different color

seno

New member
Is it possible to configure all the fields containing the string 0000-00-00 was a different color.
 

DebbieS

DaDaBIK Guru
In the function get_field_correct_displaying, look for the case "date" and add some code in there to write a color or background color if the field value is null or 0000-00-00 or whatever your DB has in it.
 

DebbieS

DaDaBIK Guru
Look for the case "date": inside the function get_field_correct_displaying. You can add your style info inside the else statement (in bold):

[pre]
case "date":
$field_value = htmlspecialchars($field_value);
if ($field_value != '0000-00-00 00:00:00' && $field_value != '0000-00-00'){
$field_to_display = format_date($field_value);
} // end if
else{
$field_to_display = "<i style="width:100%;background-color:#FF0000;"> </i>";
} // end else
break;
[/pre]

What that should do is color the cell red (with the width set to 100% of the container).
If it doesn't look exactly the way you want it to, you can modify the style.
 
Top