inline Editor: is label necessary ?
inline Editor: is label necessary ?
Hi,
In the "Selected columns only" example, all editing is done inside the cell (no modal) :
https://editor.datatables.net/examples/inline-editing/columns.html
Thus I am wondering what is the use of labels in fields, e.g. label: 'First name:'
?
And in order to use my own REST interface (without the DataTables_Editor_PHP which is overkill for my small table), I hesitate between pointing the Editor's ajax to my own custom PHP endpoint (is there any example that describes the ajax POST messages ?) or use blur event on each cell to call my own custom ajax code.
Which do you suggest is better ?
Answers
In that example you can use inline editing or a modal by selecting the row and clicking the Edit button.
See the
fields.label
docs for details but its used. The docs explain that its not required. So if all you have enabled is inline editing you don't need to define thefields.label
option.See the Client / server data docs for details.
I think that would negate the usefulness of the Editor client code. You would then need to provide a way to update the cell if the server responds with success or perform any error handling.
Kevin
Thank you very much for the advice.
I ended up using the Editor client/server protocol, which was quite easy:
$data = $_POST['data'];