How do I send the "hidden" elements in the rows that have been selected?

How do I send the "hidden" elements in the rows that have been selected?

pepopepo Posts: 1Questions: 1Answers: 0

Hello friends.

How can I send the "hidden" elements of type "input" in the rows that have been selected in a DataTable? In the example you get ALL the "input" but I just want to send those that are in selected rows.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @pepo ,

    Something like this should do the trick:

    var rows = table.rows( { selected: true } ).nodes();
    var inputs = $('input, select', rows);
    var data = inputs.serialize();
    

    Cheers,

    Colin

This discussion has been closed.