I made a checkbox-type filter for a table column, but it does not work correctly if the table data is updating without reloading the page. In my case, I update conected MySql table with AJAX and PHP hook, wpDataTable is updating well, but filter list remain with old values.
How can I update the list of the checkbox filter for the table column using Java Script in front-end?
Unfortunately something like this is not possible with the plugin build in feature and it require custom coding. We can offer you our paid customization services where you can hire one of our developers to implement this feature for you.
If you are interested let us know se we can send you a quote for this service.
Hi. Yes I understood that. But I want to make a handler by my self. And all I want from you is just some kind of documentation about using class object. Or advice with main directions and steps. Anyway, thanks for answer. And great job.
You can take a look at our documentation which uses like some info for developers. You can find some hooks and filters so I hope that it can help you out.
Hi Bogdan. Thanks for the advice, but in the article about hooks and filters I did not find any information about controlling the table in the frontend using JavaScript
Bogdan left on vacation and I will take over this ticket. Can you please send me a link of your wpDataTable so I can understood better what do you want to achieve?
Did you create custom checkbox filter or you are using built-in wpDataTable checkbox filter?
I created a table with a MySQL query and assigned a filter with a checkbox-type to one of the columns. My MySQL table are updating without reloading the page via Ajax. So, I need that the list of checkboxes in the column filter also update its values. Now this does not happen and I asked for help. Could you help me understand how I can interact with the 'wpDataTables' object to update the list of filter checkboxes using Javascript? Unfortunately, I can not give you access to a working project, so I specially created a test case to show you.
Can you please explain me in more details what do you mean by updating list of checkboxes? Can you please provide some example or some screenshot? As you can see from our documentation possible values for filter and for editor input types can be populated in three different ways - Link.
Possible values for column – this input defines how the possible values for this column will be listed. Possible values are used in the filters (selectbox, checkbox) and in the editor inputs for editable tables. The options are:
Read from table on page load (default) – possible values will be fetched from the table every time the table is open in front-end. Works fine if all the values are already there, but may be not a good solution for tables which aren’t filled in yet, also may work slow for large tables, as it performs a full table read every time.
Define values list – opens an additional tag-like input where you can enter manually all the possible values for this column, separated by comma or Enter. This input also allows reading the existing values from the table.
Hello, Milos! You said: "Also I suggest you update the plug-in to version 2.0.1, because there are many new features about filters and others."
But I was informed that version 2.0. is not allowed for commercial use. Have the terms of use changed? In the attachment, a file with screenshots and description.
1. "But I was informed that version 2.0. is not allowed for commercial use. Have the terms of use changed?"
- Version 2.0 is allowed for commercial use, and it was always. Where you saw that it is not allowed for commercial use?
2. "And could you say, how I can update the plugin to version 2.0.1?"
- We didn't yet pushed auto-update, but we plan to do that at the end of the next week. Until that you can update it manually following these instructions:
1. Go to your FTP and open WordPress plugins folder 2. Delete the old wpDataTables version folder 3. Upload the new version of wpDataTables 4. Go to WP-admin panel, open Plugins section 5. Deactivate wpDataTables, and then activate it again
IMPORTANT: Do NOT delete the old version from WP-admin (by clicking “Delete” in the plugins page) if you don’t want to lose all your tables!
3. I took a look at your issue in .pdf file. Unfortunately something like that is not possible out of the box and it would require some custom coding. We have plans to create add-on for wpDataTable next month that will make filters more powerful.
In this add-on, cascading filtering will be included as a feature. That means if you are filtering one column (For example Cars) by some value (For example BMW), Second column (For example Model) filters will be updated just with values of BMW models.
Bogdan had told me that I could use new copy for beta testing purposes only..I thought, that it means not for commertial use.
Could you give me a link for downloading new version? Last time Bogdan send me a direct link with password for an archive.
About my request - I just asked more information about JS object of WpDataTable and methods that responce for updating the list of checkboxes of the column filter . Unortunately I didn't find info about checkboxes in JQuery DataTables Plugin site. And your knowlegebase for JS callback is almost empty.
"About my request - I just asked more information about JS object of WpDataTable and methods that responce for updating the list of checkboxes of the column filter . Unortunately I didn't find info about checkboxes in JQuery DataTables Plugin site. And your knowlegebase for JS callback is almost empty."
All logic for filtering and for population filtering values is in file ../wp-content/plugins/wpdatatables/assets/js/jquery-datatables/jquery.dataTables.columnFilter.js
For checkboxes you can take a look at this function fnCreateCheckbox in this file.
The error message appears when I try to configure my tables that was made in previous version of plugin.
Last time there was the same situation, but after I cleared the browser cashe it started to work correct, but now not activate/deactivate, nor cashe browser clearing didn't help.
It seems that I've found the solution. Instead SQL request: SELECT * FROM cms_wp_mv_report_102 WHERE user = '%VAR1%' (It worked in previous version fine)
I write:
SELECT * FROM cms_wp_mv_report_102 WHERE cms_wp_mv_report_102.user = '%VAR1%'
I made a checkbox-type filter for a table column, but it does not work correctly if the table data is updating without reloading the page. In my case, I update conected MySql table with AJAX and PHP hook, wpDataTable is updating well, but filter list remain with old values.
How can I update the list of the checkbox filter for the table column using Java Script in front-end?
Hi VMorgunov,
Thank you for your purchase.
Unfortunately something like this is not possible with the plugin build in feature and it require custom coding. We can offer you our paid customization services where you can hire one of our developers to implement this feature for you.
If you are interested let us know se we can send you a quote for this service.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi. Yes I understood that. But I want to make a handler by my self. And all I want from you is just some kind of documentation about using class object. Or advice with main directions and steps. Anyway, thanks for answer. And great job.
Hi VMorgunov,
You can take a look at our documentation which uses like some info for developers.
You can find some hooks and filters so I hope that it can help you out.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Bogdan. Thanks for the advice, but in the article about hooks and filters I did not find any information about controlling the table in the frontend using JavaScript
Hi VMorgunov,
Bogdan left on vacation and I will take over this ticket. Can you please send me a link of your wpDataTable so I can understood better what do you want to achieve?
Did you create custom checkbox filter or you are using built-in wpDataTable checkbox filter?
Hi, Milos!
Glad to see you!
I created a table with a MySQL query and assigned a filter with a checkbox-type to one of the columns. My MySQL table are updating without reloading the page via Ajax. So, I need that the list of checkboxes in the column filter also update its values. Now this does not happen and I asked for help. Could you help me understand how I can interact with the 'wpDataTables' object to update the list of filter checkboxes using Javascript? Unfortunately, I can not give you access to a working project, so I specially created a test case to show you.
http://cscl-reporter.com/en/reports/table-report-by-coffeeshops
But you have to LogIn for acces the report with wpdatatable:
login: v.morgunov
password: twsdchk6h
Hi VMorgunov,
As I see from your table, when I click Name checkbox filter, modal is opened but there are not entries. What version of the plugin are you using?
Hi!
I use wpDataTables Version 1.7.2
But I also tested it function in Beta wpDataTables 2.0
There is a same problem too. The list of checkboxes is not empty there, but It also not updating without reloading the page.
Hi VMorgunov,
Can you please explain me in more details what do you mean by updating list of checkboxes? Can you please provide some example or some screenshot? As you can see from our documentation possible values for filter and for editor input types can be populated in three different ways - Link.
Possible values for column – this input defines how the possible values for this column will be listed. Possible values are used in the filters (selectbox, checkbox) and in the editor inputs for editable tables. The options are:
Also I suggest you to update the plugin to version 2.0.1 because there are a lot new features about filters and other
Hello, Milos! You said: "Also I suggest you update the plug-in to version 2.0.1, because there are many new features about filters and others."
But I was informed that version 2.0. is not allowed for commercial use.
Have the terms of use changed?
In the attachment, a file with screenshots and description.
And thank You very much for Your help!
Vitaly
And could you say, how I can update the plugin to version 2.0.1?
Hi VMorgunov,
1. "But I was informed that version 2.0. is not allowed for commercial use.
Have the terms of use changed?"
- Version 2.0 is allowed for commercial use, and it was always. Where you saw that it is not allowed for commercial use?
2. "And could you say, how I can update the plugin to version 2.0.1?"
- We didn't yet pushed auto-update, but we plan to do that at the end of the next week. Until that you can update it manually following these instructions:
1. Go to your FTP and open WordPress plugins folder
2. Delete the old wpDataTables version folder
3. Upload the new version of wpDataTables
4. Go to WP-admin panel, open Plugins section
5. Deactivate wpDataTables, and then activate it again
IMPORTANT: Do NOT delete the old version from WP-admin (by clicking “Delete” in the plugins page) if you don’t want to lose all your tables!
3. I took a look at your issue in .pdf file. Unfortunately something like that is not possible out of the box and it would require some custom coding. We have plans to create add-on for wpDataTable next month that will make filters more powerful.
In this add-on, cascading filtering will be included as a feature. That means if you are filtering one column (For example Cars) by some value (For example BMW), Second column (For example Model) filters will be updated just with values of BMW models.
Hi!
Bogdan had told me that I could use new copy for beta testing purposes only..I thought, that it means not for commertial use.
Could you give me a link for downloading new version? Last time Bogdan send me a direct link with password for an archive.
About my request - I just asked more information about JS object of WpDataTable and methods that responce for updating the list of checkboxes of the column filter . Unortunately I didn't find info about checkboxes in JQuery DataTables Plugin site. And your knowlegebase for JS callback is almost empty.
Hi VMorgunov,
"Bogdan had told me that I could use new copy for beta testing purposes only..I thought, that it means not for commertial use.
Could you give me a link for downloading new version? Last time Bogdan send me a direct link with password for an archive."
- You can download newest version at this link https://codecanyon.net/downloads
"About my request - I just asked more information about JS object of WpDataTable and methods that responce for updating the list of checkboxes of the column filter . Unortunately I didn't find info about checkboxes in JQuery DataTables Plugin site. And your knowlegebase for JS callback is almost empty."
All logic for filtering and for population filtering values is in file ../wp-content/plugins/wpdatatables/assets/js/jquery-datatables/jquery.dataTables.columnFilter.js
For checkboxes you can take a look at this function fnCreateCheckbox in this file.
Thanks a lot, Milos!
Hi VMorgunov,
You are welcome. We'd greatly appreciate it if you could take a minute and leave a review on CodeCanyon on this link. Thanks!
Hi.
I faced a problem after plugin update.
The error message appears when I try to configure my tables that was made in previous version of plugin.
Last time there was the same situation, but after I cleared the browser cashe it started to work correct, but now not activate/deactivate, nor cashe browser clearing didn't help.
It seems that I've found the solution. Instead SQL request: SELECT * FROM cms_wp_mv_report_102 WHERE user = '%VAR1%' (It worked in previous version fine)
I write:
SELECT * FROM cms_wp_mv_report_102 WHERE cms_wp_mv_report_102.user = '%VAR1%'
Hi VMorgunov,
I am glad that you find the solution for the issue.