Skip to main content
Topic: Custom view components (Read 3514 times) previous topic - next topic

Custom view components

Custom view properties

 

Re: Custom view components

Reply #1

Checkbox, Single Switch
So in Action on page Yes is Green and No is Red
in displayed field I thought why not same color for text, easy to see Yes in Green
Column "Active" in db hold Yes or No.

in List.php
<?php             
   if ($data['Active'] == 'NO')
   echo "<font color=\"#FF0000\"><strong>NO</strong></font>";
   if ($data['Active'] == 'YES')
   echo "<font color=\"#00FF00\"><strong>YES</strong></font>";
    else
?>

Hopes this helps