Need some help, I use your PHP for Datatables and modify some of it to fit with my code. The filtering work if it's not using the server side. but when it does it doesn't work. Is it anything I can do to make this work? Thanks.
Hi,
To perform full server-side data processing you will need to perform the soring in your server-side as shown in this official example. You may fully refer to the official example and adopt it for your needs.
The JS code you referred is for frontend filtering. You should not use if you need a full backend data processing.
Regard.
Here's the filter code that I mean just in case needed:
const filterTraining = document.querySelector("[data-kt-filter="training_type"]");
const filterClassOf = document.querySelector("[data-kt-filter="class_of"]");
$(filterTraining).on("change", e => {
let value = e.target.value;
if(value === "all"){
value = "";
}
dt.column(3).search(value).draw();
});
$(filterClassOf).on("change", e => {
let value = e.target.value;
if(value === "all"){
value = "";
}
dt.column(6).search(value).draw();
});