How do I change the color of the cell based on it's contents? August 21, 2019, 12:15:08 AM I have the following in my table status = pending or completed.In list view, if it's completed I want row or cell #FFA07A.If it's pending I want the row or cell #AFEBA3. Quote Selected
Re: How do I change the color of the cell based on it's contents? Reply #1 – August 21, 2019, 12:01:32 PM You can use the Custom Field Option on the Field Display Style Quote Selected
Re: How do I change the color of the cell based on it's contents? Reply #2 – August 21, 2019, 01:06:03 PM That works, but it takes away inline editing for that field and only highlights the word instead of the cell, which isn't a big deal for me. Quote Selected Last Edit: August 21, 2019, 01:22:12 PM by gulfcoastphp
Re: How do I change the color of the cell based on it's contents? Reply #3 – September 12, 2019, 07:45:13 PM @gulfcoastphp, you can also do this 👉Video. Quote Selected
Re: How do I change the color of the cell based on it's contents? Reply #4 – August 10, 2023, 11:04:57 AM 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 colorCode: [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 statementAny help is welcomeThanksGeorge Quote Selected