Ajax POST custom Parameters
Ajax POST custom Parameters
https://datatables.net/manual/server-side#Sent-parameters
Hi, i implemented the server side search.. but i need also sent to post request for ajax some other parameters
My case:
I have Location input, distance dropdown, send button.
On server side i need get lat and long of central point, find to max distance.
But this i cant send by ajax post which make Datatables.
Must i hack some input field that values of location + distance will set to some parameter and i will create custom logic on server side for this or is same example how to send via post of Datable other params as defined in docs
This question has an accepted answers - jump to answer
Answers
You can use
ajax.data
as a function to send other parameters to the server with the server side parameters.Kevin
@kthorngren
2 days i am trying read every possible documentation in Datatables + Forums and xyz example for symfony as backend (subreqests, services) and i din't see it in official docs
Thank you for answer... i feel ashamed that i overlooked it
If somebody is interested abou how it looks.. here is my example how post custom parameters.This is from Twig with Symfony 5 example