I am trying to do a filter save functionality for my clients, so they don't have to do the filtering they need every time they visit my website (those are registered users). Since wpDataTables support pre-filtering through URL, I thought that maybe it would be possible to write a Javascript code which could check the states of checkboxed and other inputs and then compile a link that would be saved for user.
The problem is that when checking out code via Inspect Element feature in my browser I don't see any state changes (that is no attributes are being added to checkboxes), so that must be happening somewhere in the background through JS. I am not using server-side processing.
So is there some kind of a function that I could tap into to see the changes in filter inputs, so I could track them and use to compile a custom URL for future filtering?
Also, is there a way to show all the items in the table through URL? Like there is an option to show 25, 50 or so entries, can I use any URL to show all the entries? Want to use this for my custom printing script, because right now it prints only what is visible on the screen.
Going a bit back with one of my initial questions: is it possible to show all entries inside table through URL. The answer was no. Maybe there is some kind of a way to force table show all elements by Javascript? Any way to pass wanted variable (my case '-1') and trigger table redraw?
Sorry to disappoint you but unfortunately something like this is not possible to achieve with the plugin built in features at the moment.
As for the custom script I can not tell you precisely because even we did not try to achieve something like this so I can give you some guide where to look.
Understood. In that case maybe you could point me in direction of files where I could find the function, responsible for table pagination (how many results are showing)?
And could I ask to add this feature to your to-do list: allow changing value of "Show ** entries" by URL (like it is possible with filters)? Something like ?wdt_pagination=show_all.
All logic for JS files in our plugin is in wp-content/plugins/wpDataTables/assets/js/wpdatatables/wpdatatables.js around line 517 you will find it for the pagination.
Hi!
I am trying to do a filter save functionality for my clients, so they don't have to do the filtering they need every time they visit my website (those are registered users). Since wpDataTables support pre-filtering through URL, I thought that maybe it would be possible to write a Javascript code which could check the states of checkboxed and other inputs and then compile a link that would be saved for user.
The problem is that when checking out code via Inspect Element feature in my browser I don't see any state changes (that is no attributes are being added to checkboxes), so that must be happening somewhere in the background through JS. I am not using server-side processing.
So is there some kind of a function that I could tap into to see the changes in filter inputs, so I could track them and use to compile a custom URL for future filtering?
Also, is there a way to show all the items in the table through URL? Like there is an option to show 25, 50 or so entries, can I use any URL to show all the entries? Want to use this for my custom printing script, because right now it prints only what is visible on the screen.
Hi Creatium,
Thank you for your purchase.
Also, is there a way to show all the items in the table through URL?
Unfortunately something like this is not possible to achieve at the moment.
As for the first request this is also not possible with the plugin built in features but one of our users shared his work.
You can find it on this ticket so maybe it can help you to also.
https://tmsplugins.ticksy.com/ticket/1702641/
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
Great. Thank you, I will work from there.
Hi Creatium,
You are welcome.
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
If I may one more question regarding URL filters. How should URL key look if I want to pre-filter multiple ckeckboxes or multiselect dropdown?
?wdt_column_filter[1]=Checkbox1,Checkbox2 or similar do not seem to work.
Hi Creatium,
Do you have any basic example of some table with checkbox so I can take a look and give you my suggestion.
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 Creatium,
Ok the table have too many columns so I made a table on my side with the checkbox
This is the code that you want to use in order to choose more values from one check box. ( for the multiselect box is the same )
Keep in mind that you will need to use pipe " | "
/?wdt_column_filter[3]=Brazil|China
Example Brazil and China are values from the checkbox. ( or multiselect box)
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
Wonderful. Thank you!
HI Creatium,
You are welcome.
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 again.
Going a bit back with one of my initial questions: is it possible to show all entries inside table through URL. The answer was no. Maybe there is some kind of a way to force table show all elements by Javascript? Any way to pass wanted variable (my case '-1') and trigger table redraw?
HI Creatium,
Sorry to disappoint you but unfortunately something like this is not possible to achieve with the plugin built in features at the moment.
As for the custom script I can not tell you precisely because even we did not try to achieve something like this so I can give you some guide where to look.
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
Understood. In that case maybe you could point me in direction of files where I could find the function, responsible for table pagination (how many results are showing)?
And could I ask to add this feature to your to-do list: allow changing value of "Show ** entries" by URL (like it is possible with filters)? Something like ?wdt_pagination=show_all.
Hi Creatium,
You can check this file wp-content/plugins/wpDataTables/source/class.wdtbrowsechartstable.php around line 483 there is a logic for pagination.
As for the feature request, i will add it on our TODO list and hopefully we can implement it for some future updates of the plugin.
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
And what about Javascript part? There must be a code that waits for a state change on that button/select and then goes for PHP to retrieve data.
HI Creatium,
All logic for JS files in our plugin is in
wp-content/plugins/wpDataTables/assets/js/wpdatatables/wpdatatables.js around line 517 you will find it for the pagination.
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! I managed to find functions that I can use to push redraw of table when I want:
wpDataTables.{table_id}.fnSettings()._iDisplayLength = -1; // number of results to show
wpDataTables.{table_id}.fnDraw(false);
{table_id} - ID of the table to redraw.