How to submit only changed fields

How to submit only changed fields

mcodermcoder Posts: 19Questions: 9Answers: 0

I was looking at the Form Input example here https://datatables.net/examples/api/form.html

When I wrote my own test case, I saw that it was sending every input field in the table whether it was change or not. Is there any way to determine only the changed fields to submit just the changes?

I have a test case here live.datatables.net/sovitigo/1/edit

Answers

  • colincolin Posts: 12,939Questions: 0Answers: 2,204

    With Editor, you would use form-options, specifically something like this:

    $('#myTable').on( 'click', 'tbody tr', function () {
        editor.edit( this, {
            submit: 'changed'
        } );
    } );
    

    Without Editor, you would need to implement that yourself,

    Colin

Sign In or Register to comment.