Add hidden in datatables ?
Add hidden in datatables ?

Hello, Please Help Me
I want to add :
Name | Position |
---|---|
Addison[0] | Addison[0] | | Staff[0] | Staff[0] | |
So I can post <input type="text"> to PHP
Here the link to the page :
http://live.datatables.net/qamocifi/2/edit
The result show after click button try. But the result seems not right.
Thank you
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @Addison ,
You can either add the HTML first, like this, or use
row.add()
to add after the DataTables initialisation.Cheers,
Colin
Thank you, @Colin
I'm prefer row.add() after some experiment.
table.row.add( [
'Addison['+i+'] <input type="text" id="name['+i+']" name="name['+i+']" value="Addison['+i+']">',
'Staff['+i+'] <input type="text" id="position['+i+']" name="position['+i+']" value="Staff['+i+']">'
} ).draw();
Well Done.