Okay
  Public Ticket #895039
Drop Down Box Search issue
Closed

Comments

  •  2
    Don started the conversation

    Hello WPDataTables

    I recently purchased the FULL version of WPDataTables, Version 1.6.2
    with purchase code:    cfec0581-b000-4a1f-ad9f-e59a3be96bcd

    Click the link below to view a movie showing the issue I am having trouble with.
    https://drive.google.com/file/d/0B62Ssr-fYB0OMm1ub3RsQUY5d0U/view?usp=sharing

    In short, I have created an Excel spreadsheet with 4 columns.  See movie for detail.

    In column D (category 1), I want to be able to put more than 1 value representing different categories each WordPress PlugIn can be associated with.

    Note in cell D2, I have entered several categories separated with a |.

    I want to be able to import this Excel file into WPDataTables and have all of the category 1 values populate the “Possible Values” field.  This seems to work as expected.

    However, when I create a multi-select filter and search using the drop down box on one of these possible values, the data does not display as expected.

    When I do a “search” on the same value, the proper data does display as expected.

    Question – is there some way the Drop Down box filter search can do a “sub-string” search in the “category 1” field”?

    If not, how would you suggest we set up the spread sheet so that using a drop down box search, we can search for one of many possible choices for a given row?

    I welcome your help.

    Thanks,

    Don

  •  1,689
    Miloš replied

    Hi Don,
    Thank you for your purchase.

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.

    Kind Regards, 

    Miloš Jovanović
    [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

  •  2
    Don replied

    http://www.buckscountymarketing.org/ 

    user:  WPData

    Password:  7LJE5LIj2Su7      case sensitive

    Tonight, Monday night, east coast time (US) I am having a MeetUp meeting where I will be showing this use of WPDataTables.  Is it possible that you could provide a solution before 4 pm today, east coast US time?

    Please advise.

    Please call or write with any questions.

    Thanks,

    Don

    +1 215 688 1469  mobile

    [email protected]

  •  1,689
    Miloš replied

    Hi Don,

    We need some more information like what kind of table do you use, can you please tell me is it server side or not?

    Kind Regards, 

    Miloš Jovanović
    [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

  •  2
    Don replied

    I am not sure if it is server side or not.  What should it be and how do I set that up?

    Attached is the Excel spreadsheet that we used.

    Thanks,

    Don

  •  1,689
    Miloš replied

    Hi Don,

    In file ../wp-content/plugins/wpdatatables/assets/js/jquery-datatables/jquery.dataTables.columnFilter.js around line 618 

    find

    search = search + '^' + $(this).val() + '$' + or;

    and replace it with


    search = search + $(this).val() + or;

    and your checkbox will select all rows which contains checked value.

    Please also uncheck Use minified wpDataTables Javascript on wpDataTables settings page.

    Kind Regards, 

    Miloš Jovanović
    [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

  •  2
    Don replied

    Thank You.

    I searched my website file directory and could not find that file.

     ../wp-content/plugins/wpdatatables/assets/js/jquery-datatables/jquery.dataTables.columnFilter.js 

    Attached is a screen shot of my WPDataTables Directory tree.

    What next?

    Don

  •  1,689
    Miloš replied

    Hi Don,

    Please first check with FTP is directory really empty, if it is, reinstal plugin because you must have query.dataTables.columnFilter.js in your file directory.

    Kind Regards, 

    Miloš Jovanović
    [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

  •  2
    Don replied

    Hi - I followed your instructions.  I removed WPDataTables from my website.  Then I reinstalled it.  And checked the website directory.  Still no file: query.dataTables.columnFilter.js    See screen shot attached.

    Could it be in another directory?

    What next?

    Don


  •  2
    Don replied

    Bogdan 

    I found the jquery.dataTables.columnFilter.js  file and made the edits as you suggested.  It still didn't work.

    I have attached the edited jquery.dataTables.columnFilter.js  file for your review and the original file (marked with BACKUP) (jquery.dataTables.columnFilter_BACKUP.js.

    See attached docx file, where I searched for "111" in both the Search box and the Category 1 box.

    What next?

    Don


  •  1,689
    Miloš replied

    Hi Don,

    You can check for this table http://www.buckscountymarketing.org/wpdatatables-support/ when you select 111 from category dropdown fitler it will find result for layout_and_design|backup|design|111| 

    For table with ID 2 you have to change different code because this table is editable and it works in another way then non-editable table. Do you wish me to send you this part of code?

    Kind Regards, 

    Miloš Jovanović
    [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

  •  2
    Don replied

    Bogdan:

    Cool!  Table 1 works exactly as expected.

    So what is the difference between [wpdatatable id=1] and [wpdatatable id=2] ?

    Table 1 is listed as Type xls and Table 2 is listed as Type Manual.

    Yes - please send me the code or a modified file which can allow the Drop Down box to do a substring search and still be editable (if that is possible).

    I also noticed that Table 2 has the "Create from Column Values" under the Possible Values, whereas Table 1 does not.

    If someone edits the table and adds or deletes an item in the Category 1 field, the table has to be updated and the Create from Column Values also has to be updated. Is that part of the issue?

    We will certainly want to have the "Create from Column Values" field to be automatically updated as the table gets edited.

    Please let me know the best solution.

    Thanks for your help,

    Don


    PS:  I have two other questions - unrelated to the above.

    Is it possible to have some type of form, which when filled out, will add data to a table?

    And is it possible to have some type of a form, which will bring in the data entered by a particular user and allow that user to edit that data, then put that data back into the table?

    How can this be done?


    Another question - can I construct a query so that only a certain set of data can be displayed from a table, based on the query parameters?  And, is it possible to construct that query with a set of drop down lists for the various fields of a table?

    In other words, let's say i want to go to a screen with a set of drop down boxes, such as:

    Color     (red, yellow, green)

    Size       (small, medium, large)

    Gender  (Male/Female)

    and have the user select from each drop down list, then press a button, and the relevant set of data is displayed.

    Is this possible?  How can this be done?


    Thanks again for your help.


  •  1,689
    Miloš replied

    Hi Don,

    The difference between [wpdatatable id=1] and [wpdatatable id=2 ] :
    - wpdatatable id=1 is table created from Add From Data Source and it is not editable. Editable tables are tables that are created manually or MySQL based tables. Non-editable table are mostly working with jQuery and they are instantly loaded when you load page. 
    - wpdatatable id=2 is manual table and it can be editable. They are working with AJAX. Data that is show on page is loaded and other data is loading with AJAX (When you change page, search any data or filter). Manual tables are stored in separate tables in database and because of that you can "Create from possible values" where with non-editable table you can't do that.

    1. If someone edits the table and adds or deletes an item in the Category 1 field, the table has to be updated and the Create from Column Values also has to be updated. Is that part of the issue?
    2. Is it possible to have some type of form, which when filled out, will add data to a table?

    Unfortunately these functionalities are not available at the moment. We will add this features in our TODO list, and maybe in future we will implement them.

    3. Is it possible to construct that query with a set of drop down lists for the various fields of a table?

    Can you explain this in more details. As I understand you want table to be hidden and when user select values from dropdowns and click search to show results in a table?

    Please send me the code or a modified file which can allow the Drop Down box to do a substring search and still be editable (if that is possible).

    In file ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php find 

    case 'select':
        $search .= '`'.$aColumns[$i]."` = '".addslashes( $_POST['columns'][$i]['search']['value'] )."' ";
        break;

    and replace it with

    case 'select':
        $search .= '`'.$aColumns[$i]."` LIKE '%".addslashes( $_POST['columns'][$i]['search']['value'] )."%' ";
        break;


    Kind Regards, 

    Miloš Jovanović
    [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