WordPress.org

Ready to get started?Download WordPress

Forums

Custom Tables
[resolved] [Plugin: custom tables] Using IF statements on cells (4 posts)

  1. crookesa
    Member
    Posted 1 year ago #

    Is it possible to use IF statements on each cell.

    1. I want to make a cell text RED if it's below a certain value?
    2. Also only show the € sign if the cell is not NULL

    Cheers if you can help

    http://wordpress.org/extend/plugins/custom-tables/

  2. crookesa
    Member
    Posted 1 year ago #

    Sorted it!!!

  3. makingtrails
    Member
    Posted 1 year ago #

    Care to share the solution? :)

  4. crookesa
    Member
    Posted 1 year ago #

    In the custom tables settins in admin panel. Go into the table you have created and click on view setup then table setup.

    This is where you define the layout of your table. I added the if statement here.

    Solutions to above.

    1.
    <td>[if field="{total_due}" check="!="]<font color="red">[/if][if field="{total_due}" check=">" var="0"]€[/if]{total_due}[if field="{total_due}" check="!=" var="0"]</font>[/if]</td>

    2.
    <td>[if field="{total_paid}" check=">" var="0"]€[/if]{total_paid}</td>

    Hope this makes sense and helps

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.