•  0
    DataTables

    Submit input elements in all DataTables rows

      Asmin Jismun    172        0        Report content

    This example shows to get all checkbox input elements from the table that has been checked. Usually when we try to submit form in DataTables, any input elements in hidden page will not be submitted. To overcome this, we must use Javascript to manually append the hidden input to the form as shown below:

    
    var myTable = $('#myListTbl').DataTable({
            "responsive": true,
            "columnDefs": [
                { "orderable": false, "targets": 5 }
                ],
            "order": [[ 4, 'desc' ]]
        });
    
    
        $("#myForm").submit( function(e){
            myTable.$('input[type="checkbox"]:checked').appendTo(this);
        });
    
    

     


Leave a Comment

Please Login to insert comment.

 

Facebook Conversations