How to block the submit of edited values
How to block the submit of edited values
Hi, I have a datatable that gets its initial data from ajax, and then the user is able to edit a column, but I do not want these entered values to be submitted to the backend in the usual editor CRUD manner, I plan to grab all the data on submission of the container form.
Basically, I would like the datatable to keep the new value, but not to update the backend.
I'm using inline editing, and I've tried using 'preSubmit' to block the CRUD function, which works, but the field remains in a locked editing state.
Is there a way to take the field out of an editing state, but keep the entered value?
Thanks, Chris
This question has an accepted answers - jump to answer
Answers
This thread is very similar:
https://datatables.net/forums/discussion/74863/hidden-field-in-editor-need-to-submit-this-field-on-edit-inline-but-not-on-create
I would try to delete the fields from the submission or follow Allan's suggestion to use "fields.submit" and return "false" https://editor.datatables.net/reference/option/fields.submit
Amazing thank you, I was able to find a solution using the fields.submit