Is it possible to fetch the number of possible values in a filtered table and display that result? For instance, if there are 10 possible values but in the filtered table, only 6 are present, I'd like to be able to display the number "6" somewhere.
Hi Alec, I really like this idea for the use-case, but sorry to disappoint you, at this time, we don't have any built-in solution to pull/and display the number of the column's filtering possible values.
You can suggest it to our developers, though - they will do their best to make a solution in the future.
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
If you have coding skills and wish to try to make a custom solution now,
Digging a little deeper into this...wondering if it's possible to get a JSON array returned with all the filtered values (I have the row limit set to 10). I then could parse the data I need from the JSON.
If you mean to 'save' the filter selection, we might have a similar custom workaround idea our devs shared from before.
This bit of custom js will update the browser url (without triggering a reload) to reflect what values have been entered in filters, thereby generating a direct link to the current 'view'. Note this only works for separate filter forms, but should only need a couple of tweaks to do a version for the simple in-table filter boxes ...
jQuery(window).load(function(){
wpDataTables.table_1.addOnDrawCallback(function(){
var params={};
jQuery('.wpDataTableFilterSection').each(function(i, obj) {
if ( inputbox = obj.id.match("table_1_(.+)_filter_sections") ) {
if (jQuery(obj).find('input').val()) {
var key='wdt_column_filter['+inputbox[1]+']';
params[key] = jQuery(obj).find('input').val();
}
}
});
history.pushState('','','?'+jQuery.param(params));
});
});
Is it possible to fetch the number of possible values in a filtered table and display that result? For instance, if there are 10 possible values but in the filtered table, only 6 are present, I'd like to be able to display the number "6" somewhere.
Hi Alec,
I really like this idea for the use-case, but sorry to disappoint you, at this time, we don't have any built-in solution to pull/and display the number of the column's filtering possible values.
You can suggest it to our developers, though - they will do their best to make a solution in the future.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
If you have coding skills and wish to try to make a custom solution now,
you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.
We also added this new developer's handbook, which can allow users with coding skills to make custom add-ons.
Our developers will keep adding more custom hooks/examples there over time.
Please be advised that custom solutions with hooks are not included in our support.
You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.
( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)
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
Digging a little deeper into this...wondering if it's possible to get a JSON array returned with all the filtered values (I have the row limit set to 10). I then could parse the data I need from the JSON.
i Alec,
If you mean to 'save' the filter selection, we might have a similar custom workaround idea our devs shared from before.
This bit of custom js will update the browser url (without triggering a reload) to reflect what values have been entered in filters, thereby generating a direct link to the current 'view'. Note this only works for separate filter forms, but should only need a couple of tweaks to do a version for the simple in-table filter boxes ...
I hope this might help.
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