Payload Holds Old Form Values and New Values, Duplicating Form Variables
Payload Holds Old Form Values and New Values, Duplicating Form Variables
So I have an issue when I submit a form that has DataTables active on it that the Payload is retaining the old form values and has the new values which is duplicating the form and also making it impossible to get rid of the old value.
Here's an example from the Payload:
trackingInstanceId: 1258
criticalImpactCommentsLOCS1258: Test comment
trackingInstanceId: 1258
criticalImpactCommentsLOCS1258: Justin Testing
The first is the original and the second is the new value. I am using DataTables 1.10.12 and here's my script that creates the table:
$(document).ready(function(){
$('#myTableInWork').DataTable({
"order":[[0,'desc']],
"ordering": true,
"fixedHeader": true,
"responsive": true,
"autoWidth": true
});
});
I am not using AJAX or anything, just a simple form with a textarea that I fill in and then hit submit. When I comment out the code above, the form works properly. So I have narrowed it down to the DataTable tool. I have Googled and researched all day and cannot find a solution. Any help or guidance would be much appreciated.
Thanks in advance.
Answers
The code snippet doesn't show how Datatables is involved with this problem. Is the textara part of the Datatable table? Unfortunately its not enough to understand your solution and problem. Please provide a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin