How do I add a Button Collection to display menu items to add to search query
How do I add a Button Collection to display menu items to add to search query
So I have finally worked out how to display a custom button collection with 3x buttons. (Showing my level of skill here).
What I would like is for the items in the button collection to send search query terms to the main Search box.
So click on the Accounting button, and "Accounting" is stamped in the search box.
Can someone please provide a code sample I could use, perhaps in the action: function (...) for each button?
I've read everywhere, but can't seem to locate ow to do this.
Much appreciated.
This question has an accepted answers - jump to answer
Answers
For further info, this is my button code: it filters the table but I need to stamp the search query into the Search box.
The search box uses a query string url, so the URL can be emailed if required.
Thanks.
Hi @BrettA ,
It's just a case of changing your
dt.column(3).search()
, to bedt.search()
. If you do a globalsearch()
, the search term is entered automatically into the search field.Cheers,
Colin
Thanks Colin, I was almost there but it would taken me all day to work that one out, much appreciated.