As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2145799
WPDataTable
Closed

Comments

  • dibixsrl started the conversation

    Hello,

    I purchased your plugin some time ago, now I have another project with some peculiar requests from my customer all about data filtering, so before adopting your plugin as the solution proposed I need to know 2 things:

    1) Is there a way (using a hook or else) to use the filters in OR instead of AND

    2) Is there a way (using a hook or else) to order alphabetically the options in the multiselect? (I mean the options added in the section Data -> Define value list)

  •  2,576
    Aleksandar replied

    Hello dibixsrl.

    1) Filters are currently set up to use "OR" with select and check-boxes. You can see this in ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php around line 1681:

    $j = 0;
        $search .= " (";
        foreach ($checkboxSearches as $checkboxSearch) {
          if ($j > 0) {
             $search .= " OR ";
        }
    

    If you need to change it from "OR" to "AND", simply modify that so it looks like this:

    $j = 0;
        $search .= " (";
        foreach ($checkboxSearches as $checkboxSearch) {
          if ($j > 0) {
             $search .= " AND ";
        }

    2) Unfortunately, at the moment, the values are being read in the order they appear in the table, and to get the to appear alphabetically you would need to enter them manually one by one.

    You're welcome to take a look at our hooks and filters and see if there's anything that could help you out there.

    Please note that using hooks requires certain level of programming skills and included support refers only to advice.

    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