Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - gkondylis

1
General Discussion / Re: How do I change the color of the cell based on it's contents?
Hello all,
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