Okay
  Public Ticket #1921227
Conditional format for URL Link Columns
Closed

Comments

  • soportesv started the conversation

    Hello, I'm wanting to condtionally format a column that contains a url link so that everytime a cell value is for exaple '#' or '-' it adds a css class that hides the column, but when I try to make the rule and evaluate the cell content, it doesn't work.

    Is it possible to use conditional format on these types of columns? Or maybe hide some columns based on values?

    Also, I'm trying to make a table header fixed on top so that when I scroll the header remains on top of the data, I've read that this is a not built in feature on the plugin but, could there be a way to write some custom code so that every table behaves like this?

    Thanks for the support!

  •  2,572
    Aleksandar replied

    Hello soportesv.

    Thank you for your purchase.

    This may not be achieved as easily as one might think. You can add a rule like this:

    3182260341.png

    and then apply the following CSS in Custom CSS under main settings of wpDataTable:

    table.wpDataTable tbody tr td.test{
    display: none !important;
    }
    

    but that would just hide the column's contents and move the others to the left. So, you'd still have the header and footer active, which cannot be removed dynamically, by adding the conditional rule:

    2440506871.png

    That just looks bad.

    You can add this CSS:

    table.wpDataTable tbody tr td.test{
    opacity: 0 !important;
    }
    

    so the table looks like this:

    8102395933.png

    Now it hid the contents of the first column.

    So, there's no way of dynamically hiding the entire column using rules.

    Fixed table header would be considered a custom solution, and you can take a look at this link to see if it gives you some ideas as to how it can be implemented.

    Please note that customization questions like this one are not covered in the included support for the plugin. Included support covers help with bugs and general inquiries for the plugin features, but not writing custom code. As you're developing some custom solution if you need our assistance we can offer you our paid customization service.

    Sorry for any inconvenience.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables