Hi,
thanks for your post, and sorry for the trouble.
Do you mean pre-defined search terms? Or the entries from a certain column? For the latter, the TablePress Extension from https://tablepress.org/extensions/datatables-columnfilterwidgets/ could maybe be worth a look.
Regards,
Tobias
Thread Starter
trorie
(@trorie)
Hi TobiasBg,
Thanks for the quick response! Yes, I do mean pre-defined search terms. For example, if I have a table with “Washington”, “Virginia”, or “California” as location values, I want users to be able to select one of these options to see all the entries that exist with these options. However, I want this to work as a search option, not a sort.
Thanks,
Trorie
Hi,
then, the mentioned TablePress Extension might be worth a try here. It can generate such dropdowns from the table columns automatically.
Regards,
Tobias
Thread Starter
trorie
(@trorie)
Thank you! I will give it a try!
Trorie
Thread Starter
trorie
(@trorie)
One more question. Is there a way to make the search box itself into a list of drop down values, or will this require a little coding?
Thanks,
Talvina
Thread Starter
trorie
(@trorie)
Hi Tobias,
Please disregard my last question. I think I figured it out with the Plugin that you suggested.
Thanks,
Talvina
Thread Starter
trorie
(@trorie)
I do have one question about the ColumnFilterWidgets extension. Is there a way to specify what I want to display in the drown-down? I don’t want to pull it from the column, because the some columns in the table may have multiple values.
Thanks,
Talvina
Hi,
no, sorry, manually specifyfing these values is not possible.
However, if there are multiple terms in the same cell of the column, you could use the datatables_columnfilterwidgets_separator Shortcode parameter that is explained on the Extension’s webpage, to use all of them automatically.
Regards,
Tobias