• Resolved IamPetard

    (@iampetard)


    Hello Tobias!

    I love how the search bar is also a filter for the table content! However I would like to have a widget or a section next to the table where I can put certain words that could be used as filters.

    You know how Ebay, Newegg and other sites with products have filtering options where you just tick a box next to a word and it automatically filters the list.
    Could that be possible with TablePress? Some sort of widget or space next or above the table with some words where people could tick a box and only content with that word would appear.

    I didn’t spend a lot of time searching the support so forgive me if this was already asked, the forum is a bit messy ??

    Hope you can let me know is this possible or will it be implemented in the future.

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

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

    (@tobiasbg)

    Hi,

    thanks for your question!

    Unfortunately, I’m not aware of an existing solution that does that, sorry ??
    This should however be possible to achieve something like this by using custom coding that uses the DataTables JavaScript library’s API (see https://www.datatables.net/ )

    Something similar that might be helpful is available as a TablePress Extension. The plugin from https://tablepress.org/extensions/datatables-columnfilterwidgets/ can be used to get the dropdowns as they can be seen on https://datatables.net/extras/thirdparty/ColumnFilterWidgets/DataTables/extras/ColumnFilterWidgets/

    Regards,
    Tobias

    Thread Starter IamPetard

    (@iampetard)

    That is excellent, its about 92% of what I want so I’m satisfied! If my website kicks off as expected I’ll be sure to make a donation.

    Thanks for the epically fast and useful response!

    Thread Starter IamPetard

    (@iampetard)

    One issue though – some of my columns have linked content and that is not filtered. Only text columns are.

    Can that be fixed? It’s not essential but it would be useful.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that this will help! And thanks for wanting to donate, I really appreciate it!

    With the columns with links in it: Yes, such columns are not properly supported by the JS code that is used for this, but as that’s an external library, I can not change this.
    However, there’s a good workaround for this: Basically, you’ll need to create a second copy of the column, with the same content, except that the content is not linked.
    Then, that column can be hidden from the visitor, but we can tell the script to use that for the dropdown, instead of the linked column.

    Regards,
    Tobias

    Thread Starter IamPetard

    (@iampetard)

    How exactly do I do that?

    I created a column with the same data but just in text and hidden it.
    If I leave the filtering options, they show no results like before.

    Do I need to use some other way to hide the column?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, you’ll need to hide the column via CSS and not via the method on the “Edit” screen.
    So, please try adding this to the “Custom CSS” on the “Plugin Options”:

    .tablepress-id-123 .column-4 {
      display: none;
    }

    where you adjust the table ID and the column.
    Then, extend the Shortcode with another parameter for excluding the other columns from the ColumnFilterWidgets (see the last paramater on https://tablepress.org/extensions/datatables-columnfilterwidgets/ ).

    Regards,
    Tobias

    Thread Starter IamPetard

    (@iampetard)

    Wonderful!I shall have the most glorious tables on the internet!

    Thanks a bunch and I’ll see you around!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    sure, 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 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Quick Filtering options’ is closed to new replies.