I have a form in a table. It works like a kind of spreadsheet for editing existing data. Above every column you can click the header to sort the table on that column.

Now there is a problem that when you sort input fields the modifications tend to be discarded. Someone helped me to solve that problem for the text input fields with the formula:

[CODE][].slice.call(tblEl.querySelectorAll('input[value]')).map(function(a){a.setAttribute('value', a.value);});[CODE]

Somehow this prepares the content of tablebody tblEl for being copied. I am still trying to really understand what it exactly does but it works for me for the input fields.

Now my question is how I could achieve the same for the checkboxes, textareas and selects.