• Resolved bysj3ukdyjxfbkn7

    (@bysj3ukdyjxfbkn7)


    Hi, we want wpDataTables to be able to do a “multiple global search”, we are using v7.3. We have a custom textbox on the webpage with event listeners that use table_1.api().search(...).draw() to mimic the global search. This works fine.

    However, we now want to do multiple rounds of searching. For example, I want to search all rows that match “Alice”, then within those rows, search those that match “Ben”. At the end, I want to search all rows that match both “Alice” and “Ben”.

    It would be good if we can use https://datatables.net/reference/api/search() but the regex search doesn’t seem to work. I’ve also tried enabling 'bRegex' => true in class.wpdatatable.php but that didn’t work either.

    Is there a way to achieve this? Developer-level answers are fine.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Milos Jovanovic

    (@milosjovanovicwpdt)

    Hello,

    When it comes to global search functionality, the only built-in option we currently offer is the Global Page Search shortcode, described here:
    https://wpdatatables.com/documentation/table-features/global-page-search-shortcode/

    Please review that and see if it could potentially work for your use case.

    Based on your description, it sounds like you’re trying to implement a multi-step global search, where each new query refines the previous results — for example, searching for “Alice,” and then narrowing those results further by “Ben,” ultimately returning rows that match both.

    Unfortunately, wpDataTables doesn’t support this kind of cumulative global search natively. While our plugin is based on DataTables.js, not all of the base library’s features (like complex .search() chaining) are exposed through our plugin interface.

    We do have a premium add-on called Powerful Filters that supports cascade filtering — where filtering one column (e.g., Continent = “Europe”) dynamically limits the available options in another column (e.g., Countries = only those in Europe):
    👉 https://wpdatatables.com/documentation/addons/powerful-filtering/

    However, this is different from what you’re describing — since cascade filtering is column-based, not a chained global search through a single custom input or action. If your goal is to execute multiple chained global searches via code, that would require a fully custom solution on your end.
    Please note, our Support does not cover custom solutions.

    That said, since you’re using version 7.3, you are a Premium user. So, we recommend opening a support ticket through our premium help desk:
    👉 https://help.wpdatatables.com/en/articles/39-how-to-contact-support-with-your-premium-license

    You can try to explain what you’re trying to achieve in more detail, and our team will do their best to assess whether any workarounds are possible.

    Kind regards,
    Milos

Viewing 1 replies (of 1 total)

The topic ‘Multiple Global Search’ is closed to new replies.