Is it possible to seta filter based on chosen column ( password for example ) and filter the table with only items matching this password. After that, even if the filter is deleted, the table has to be empty and not allow the users to see all the lines of the table.
SELECT * FROM yourDatabaseTable
WHERE someColumn = %VAR1%
%VAR1% can be defined in the Placeholders tab when you're creating a table.
You can also alter this in the shortcode.
For example, if you don't add the condition in the query, you can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".
Then, when you add the table to a page, you can use [wpdatatable id=1 var1=USA] on one page, [wpdatatable id=1 var1=Germany] and so on, to apply the values defined in the shortcode to the filter.
2.
Here is another example, with a VAR placeholder as prefiltered value
Let's say if we had a Region column, in a table, that we want to use for this filtering.
Then you can set different shortcodes for the same table, on different pages.
For example, if we set a table like this :
And in the Region column, prefiltered value as VAR1 placeholder
Then, this is the shortcode for a page if we want only Region A
Now regarding hiding the filter so that users can't clear it.
Here you can see my video example, if you wish to hide a column filter, so that no users can "clear it" , and the table will remain filtered.
And, just wanted to point out that we have a Demo Sandbox site, where you can try out the plugin functionalities, on this link
and there is a 15-day money-back guarantee period, So if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)
Let me know how that seems, and If you have any questions. Thanks
Hello,
Is it possible to seta filter based on chosen column ( password for example ) and filter the table with only items matching this password. After that, even if the filter is deleted, the table has to be empty and not allow the users to see all the lines of the table.
I hope it's clear.
Best Regards
Med Mouden
Hi, Med
Sorry for the delay
-
I am not sure I completely understood the goal.
-
For example, if you wish to prefilter the table, on a column, so that it only shows the table filtered like that,
it is possible by using our placeholders via shortcode.
But I am not sure about the other part, that you described, when the filter is deleted ( I suppose you mean if someone clears the filter),
and then users should not be allowed to see the rest of the table, right?
-
I will show you example how you can do both, and let me know if that works for you.
There can be a couple of different ways to achieve prefiltering.
You can use placeholders for table generation.
1. For example, if you have a MySQL query-based table, you can use this query:
%VAR1% can be defined in the Placeholders tab when you're creating a table.
You can also alter this in the shortcode.
For example, if you don't add the condition in the query, you can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".
Then, when you add the table to a page, you can use [wpdatatable id=1 var1=USA] on one page, [wpdatatable id=1 var1=Germany] and so on, to apply the values defined in the shortcode to the filter.
2.
Here is another example, with a VAR placeholder as prefiltered value
Let's say if we had a Region column, in a table, that we want to use for this filtering.
Then you can set different shortcodes for the same table, on different pages.
For example, if we set a table like this :
And in the Region column, prefiltered value as VAR1 placeholder
Then, this is the shortcode for a page if we want only Region A
-
I also made a short video, as an example - please check it out here.
-
Now regarding hiding the filter so that users can't clear it.
Here you can see my video example, if you wish to hide a column filter, so that no users can "clear it" , and the table will remain filtered.
And, just wanted to point out that we have a Demo Sandbox site, where you can try out the plugin functionalities, on this link
and there is a 15-day money-back guarantee period, So if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)
Let me know how that seems, and If you have any questions. Thanks
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