Is it (or could it be) possible to supply differing labels and values for filter select lists? A datatable I have supplies values for payment type which uses their ID (ie "rdmfju-j5") whereas ideally I'd like to show something more readable (ie. "Credit card").
I can get my query to adjust the display values using a CASE statement however this then seems to break the filtering as, I presume, it's trying to filter by the value in the case statement (i.e "Credit Card") instead of the actual value ("rdmfju-j5").
If were were able so supply differing values to labels this could help?
If i understand the use-case, you would like to have a different "display value" that the end user can see when they choose values for filtering in a selectbox filter?
-
At the moment, this can only be achieved with our native Foreign Key relation feature.
It can allow you to have one "store value" which has to be a unique integer row identifier row of the foreign table;
while using another column as the "Display value";
and this displayed value can also be presented during filtering in a selectbox.
Is it (or could it be) possible to supply differing labels and values for filter select lists? A datatable I have supplies values for payment type which uses their ID (ie "rdmfju-j5") whereas ideally I'd like to show something more readable (ie. "Credit card").
I can get my query to adjust the display values using a CASE statement however this then seems to break the filtering as, I presume, it's trying to filter by the value in the case statement (i.e "Credit Card") instead of the actual value ("rdmfju-j5").
If were were able so supply differing values to labels this could help?
Hi, Simon.
If i understand the use-case, you would like to have a different "display value" that the end user can see when they choose values for filtering in a selectbox filter?
-
At the moment, this can only be achieved with our native Foreign Key relation feature.
It can allow you to have one "store value" which has to be a unique integer row identifier row of the foreign table;
while using another column as the "Display value";
and this displayed value can also be presented during filtering in a selectbox.
Please check more about our Foreign Key Relations here.
Let me know if that helps for this use-case.
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