How can I have a section with search bar, 3 filters (from 3/10 columns) show up first then the table

How can I have a section with search bar, 3 filters (from 3/10 columns) show up first then the table

kzkkzk Posts: 9Questions: 4Answers: 1

I was hoping to use datatables to create a search function on my page. I want a section, above the table, with the search bar, and 3 dropdown filters.. I want the data to be filtered/searched according to the user selection. I know the following can be done:
1. Searc
2. Dropdown filters on select columns.

Is it possible to pull those filters and search bar and put them together in a section on top of the table? Thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,302Questions: 26Answers: 4,947
    Answer ✓

    You can create your own custom search functions. This example, while not exactly what you are asking for, might get you started:
    https://datatables.net/examples/api/regex.html

    Kevin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @kzk ,

    This example shows filters and searches being inserted into the column footers. They could be inserted just as easily anywhere else on the page, like above the table as you need.

    Cheers,

    Colin

This discussion has been closed.