1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Highlight a cell on a worksheet depending on Yes or No

Discussion in 'Community' started by lpro87, Mar 7, 2022.

  1. lpro87

    lpro87 New Member

    Level: Community
    How can I highlight a cell on a sheet depending on the content Yes or No?
     

    Attached Files:

  2. lousyfool

    lousyfool Well-Known Member

    Level: Community
    In the element's config, under "List view settings", set "Use as row class" to yes. Then use custom CSS to highlight the cell as you like.
     
  3. lousyfool

    lousyfool Well-Known Member

    Level: Community
    BTW, are you using Joomla 2.5 and Fabrik 3.0? Because this is the forum for it.
    For newer versions please use the one for Joomla 3.0+ and Fabrik 3.1+. Thank you.
     
  4. lpro87

    lpro87 New Member

    Level: Community
    Thanks. And how can you make a condition in css?
    For example: If the value in the cell is "YES", then the cell is red, if "No", then the cell is yellow.

    I use Joomla 3+ and Fabrik 3.1+
     
  5. troester

    troester Well-Known Member Staff Member

    Level: Community
    See WIKI or tooltip
    Use your browser dev tool to examine the exact CSS class added to your list row (depending on your list template you'll see something like
    <tr class="... your-value1 your-element-your-value1...>
    <tr class="... your-value2 your-element-your-value2...>
    Then add custom CSS for all possible classes, e.g.
    tr.your-value1 td {background:yellow}
     
  6. lpro87

    lpro87 New Member

    Level: Community
    Thanks everyone, I got it.
     

    Attached Files:

  7. bggann

    bggann Member

    Level: Community
    troster this works to highlight the row. Is there any way to highlight just a cell? BTW - I had to turn off stripped in the table format to make it apply to all rows.
    Bob
     
  8. lousyfool

    lousyfool Well-Known Member

    Level: Community
    Yes. You'll just need to add the cell's class to the td selector. E.g.
    tr.your-value1 td.cell-class {background:yellow}
     

Share This Page