Preload List based on Submitted Entry
Preload List based on Submitted Entry
Hi there,
I have a submit button that I would like to act as a filter to help filter down results to speed up loading.
The theory is that if a user types "Tucker", then the next page will load "Tucker" in the searchbox and the searches with "Tucker" in the results will be retrieved. However, should "Tucker" be deleted, then the entire list should be revealed and/or loaded.
I know it ought to be possible, so if anyone can point me in the right direction I would be grateful.
Cheers,
TM
This question has an accepted answers - jump to answer
Answers
Do you mean the next HTML page - i.e. a new DataTable is being created? If so, use
init search
to set an initial search string.Allan
Hi Allan,
Do you mean this?
https://datatables.net/reference/option/search
I have tried this in the past but it didn't work. I passed the variables through PHP and got it to echo correctly but the search did nothing. Do you have a working demo around that I could use as a reference?
Sorry yes - that's the correct link.
In what way did it not work? Did you get any errors, the filter wasn't applied? Can you link to the page so I can debug it please?
Allan
Apologies for the extended delay.
I figured out the error. I wasn't passing the variable through properly and have fixed it without issue.
Thanks again.