Can I modify the request type of my inline Editor AJAX call based on the edited cell values?
Can I modify the request type of my inline Editor AJAX call based on the edited cell values?

I want to use Editor in such a manner that if the cell I edit is initially blank and I edit it to contain data, it sends a POST request. If the cell already contains data and I edit that, I want it to send a PUT request.
I know that I can submit an object to the ajax option with what to do for "create", "edit", "delete", etc. In my case, Editor will think it's an "edit" action all the time - I want to determine the request type based on the type of edit.
This discussion has been closed.
Answers
You'd need to use
ajax
as a function and then call$.ajax()
(orfetch
or whatever you prefer) directly.There isn't a way to modify the verb that Editor sends from its default Ajax call on-the-fly based on the data I'm afraid. Using your own function would be the only way to do it.
Allan