WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Multiple Search Terms (8 posts)

  1. GraphixWorks
    Member
    Posted 1 year ago #

    Hello,

    I was wondering if it is possible to search the tables for multiple terms at once. Form example if I were to type "cats+dogs" into the search box, could the results for cats AND dogs show below, instead of the string "cats+dogs"?

    Any input you can provide is greatly appreciated.

    Thanks in advance,

    James

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi James,

    thanks for your question.

    Unfortunately, from what I know, the DataTables JavaScript library from http://www.datatables.net (which WP-Table Reloaded uses for the search feature), does only support OR searches, by searching for "cats dogs", i.e. the search terms separated by a space.
    Sorry for not having better news :-(

    By the way: WP-Table Reloaded is being replaced by TablePress, see http://tobias.baethge.com/2013/01/tablepress-replaces-wp-table-reloaded/

    Regards,
    Tobias

  3. GraphixWorks
    Member
    Posted 1 year ago #

    Thanks for your quick reply Tobias,

    Should the OR searches work by default or is there a way that I need to enable them? I think this would accomplish what I need. I need to filter results based on a store number and display only rows with store # 123 OR 234.

    When I search for "123 234" I am getting no results, despite that there are rows with 123 and 234.

    Please let me know if there is anything else I need to do or if I'm misinterpreting the search capabilities.

    Thanks,

    James

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi James,

    you know what, I might have mixed things up here. The filter word "cats dogs" is actually the AND search. So, DataTables does have AND search (with a space instead of a +), but it does not have an OR search...
    Sorry for the confusion.

    Now, this search/filtering only applies to the JS functionality for the user, when viewing the table.
    Additionally, there's a Filtering that can be used to only show rows that match a filter (which should be what you describe). You can find that code in an Extension, but only for the TablePress plugin, and not for the old and outdated WP-Table Reloaded. Please see http://tablepress.org/extensions/row-filter/ for more.

    Regards,
    Tobias

  5. GraphixWorks
    Member
    Posted 1 year ago #

    Thanks again for your reply Tobias,

    The filtering that you are referring to will only work for shortcodes, not the actual search field, correct?

    Thanks,

    James

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi James,

    exactly. The Filtering works on the Shortcodes, so that only those rows that match the filter term are actually shown on the page, while those that do not match are not visible.

    Regards,
    Tobias

  7. GraphixWorks
    Member
    Posted 1 year ago #

    Thanks Tobias,

    This means that, while I can't have the user delimit their search to multiple stores, I can probably generate clusters of stores (regions) already for the user, with the shortcodes.

    Thanks again for the prompt response and the good info :)

    James

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi James,

    yes, with that solution you can create pre-filtered tables from one large "master table". These smaller tables would of course still be filterable by the user with the JS filtering.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic