For me it looks like to be a bug, that when you have a shortcode
[wpdatatable id=1 VAR1="Rheinfelden"]
and in the wpDataTables "Sorting and filtering" "Show filters in a form above the table" activated, the %VAR1% in the respective column isn't evaulated.
I am sorry, but i am not sure if i fully understood the issue you described.
Here is an example how you should set up the column settings and the table shortcode in order to use the VAR placeholer for predefined filtering.
-
You can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".
Then, you can have different versions of the same table, with the VAR1 value passed in the shortcode,
let's say if we had a "Regions" column and we wish to filter a different region per each page.
If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :
Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,
page 2 for only "Region B", shortcode would be [wpdatatable id=1 var1='Region B'] and so on,
to apply the values defined in the shortcode to the filter.
( This filtering method can be used for any table type, besides Simple Tables)
Hi there
For me it looks like to be a bug, that when you have a shortcode
[wpdatatable id=1 VAR1="Rheinfelden"]
and in the wpDataTables "Sorting and filtering" "Show filters in a form above the table" activated, the %VAR1% in the respective column isn't evaulated.
Can this be confirmed?
Best regards,
Marco
Hi, Marco
Thanks for reaching out to us
I am sorry, but i am not sure if i fully understood the issue you described.
Here is an example how you should set up the column settings and the table shortcode in order to use the VAR placeholer for predefined filtering.
-
You can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".
Then, you can have different versions of the same table, with the VAR1 value passed in the shortcode,
let's say if we had a "Regions" column and we wish to filter a different region per each page.
If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :
Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,
page 2 for only "Region B", shortcode would be [wpdatatable id=1 var1='Region B'] and so on,
to apply the values defined in the shortcode to the filter.
( This filtering method can be used for any table type, besides Simple Tables)
-
I also made a short video example - please check it out here.
Let me know if that is what you needed.
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 Milos
Does the filter on the Region column also work, when you activate "Filters in a form" "Show filters in a form above the table"?
Best regards
Marco
Hi, Marco
Yes, the filtering functionality/logic works in the same way, if you leave the filters under the table,
or if you change the position of the filters above the table.
Let me know if anything is still unclear or if you have any further questions. Thank you
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