I'm noticing some odd behaviour when filtering one of my wpDataTables. You can see this yourself - if you go to the attached page and press the "Beach Name/Location" dropdown to enable filtering, there's a brief pause and then it offers you two beaches that aren't in this list at all.
From my experimentation it would appear that these are the beach names returned from the example query in the wpDataTables editing UI, using the sample %VAR1% variable. And, indeed, changing %VAR1% does indeed change the list.
I'm not sure if this is a bug or a feature, but is there any way to have this list read from the same query as the table itself did?
Hi Chris,Thank you for your purchase.
Yes, the filters will be used if you use VAR in the query, so the select box will return the data based on that VAR.
To enable all the options in the select box, you can do that by going to column settings for that column,
go to data tab (attachment) and see if the option for Possible values for column is set to be "Read from table on page load"
Also check if there are not any predefined values set for this column.
Attached files: Screenshot 2021-05-06 at 15.04.04.png
TMS support team
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs | Instagram
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs | Instagram
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi there - sorry, I should maybe have been a bit more clear. I am showing the table with:
[wpdatatable id=1 var1='SC']
The table works very well. However, the filter dropdown is using the "placeholder" variable values, and not the ones that were passed into the shortcode. I can verify this because if I change the placeholder value to "SC" then it shows the correct ones.
I do already have the option to "read from table on page load" switched on.
Thanks for your help,