• Resolved Bruno Braga

    (@brunobragaw8t)


    Hello TablePress support team,

    I’m looking for a feature that I don’t know if it is already possible to do:

    I want to display the same table in 2 pages BUT I want the table on the second page to display only rows that have the column 6 filled with some data.

    Is it possible to accomplish this request of my client with the current state of the plugin? I am willing to do some php if necessary.

    EDIT:
    I was thinking about something like:

    if table_id is x {
        cycle {
            if column 6 is filled {
                print row
            }
        }
    }
    else {
        cycle {
            print...
        }
    }

    It’s just a theory in my mind. I’m not experienced in wordpress and I don’t know if it’s possible to accomplish what I’m trying to do.

    EDIT 2:
    I also thought about hiding those rows with jquery on page load. But that’s easily “hacked” using browser tools and inspecting element of the page.

    Thank you for your time.
    Bruno

    https://www.ads-software.com/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The TablePress Row Filter Extension from https://tablepress.org/extensions/row-filter/ could be helpful here.

    With that, you could use a Shortcode like

    [table id=123 filter="a||b||c||d||e||f||g||h||i||j||k||l||m||n||o||p||q||r||s||t||u||v||x||y||z" filter_columns=6 /]

    which would result in all rows being shown that contain at least one letter from the alphabet in column 6 — essentialy leaving out rows that are empty in that column. (Of course, if you have simpler keywords that match, you could also use those.)

    Regards,
    Tobias

    Thread Starter Bruno Braga

    (@brunobragaw8t)

    Thanks a lot for your answer! What you said really worked out BUT I want to do the REVERSE.

    I don’t want to show those rows, I want to hide them. Is there a way that I can do it?

    To give you some details that might help: I want to write “GREEN” or “RED” on that column. If that column is empty, it should hide the row.

    EDIT: Never mind, I’m dumb. What you said is right. Thanks a lot for your answer once again. Cheers!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Print Row is certain Column is filled’ is closed to new replies.