i want to submit the rows of data as an array when i submit the form. the columns would have to be inputs.
how do i define the columns as input for dynamic table so the will be in form post?
This question has an accepted answers - jump to answer
Hi @mikeD123 ,
Is this using Editor? If not, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
i am not using editor. i just want to have my table rows in my form data when i click submit. i see examples but they all have the TDs in the html.
since table is built dynamically i wanted to know if there was a column type i could set so the column would have Input tag so it is selected with form.
do i need editor to have TDs contain inputs, or is there another way to have rows in form data?
You can render the input html using columns.render. The docs have some examples showing links but the same concept applies.
When you submit the for you will use jQuery ajax to send the update to the server. I would recommend similar behavior as Editor in that the response contain the updated DB data then update the Datatable row with the response data. This way you know the Datatable data and the DB match. How you implement this is up to you as it is outside of Datatables.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.