1
General Discussion / Re: How do I change the color of the cell based on it's contents?
I am new to PHPRAD.
I have a Status column and trying to change its color based on the value. Trying the above solutions but I get a weird error. I am setting its display type as Custom and then using this code to change the color
Code: [Select]
<?php
if($data['Status'] = 'Completed'){
?>
<span class="badge badge-success"><?php echo $data['Status'] ?></span>
<?php
}
else{
?>
<span class="badge badge-danger"><?php echo $data['Status'] ?></span>
<?php
}
?>
When I preview the list, the Status field on all records get the value "Completed" or whatever I set on the first clause of if statement
Any help is welcome
Thanks
George