Checkbox in datatable to populate the values in input hidden!
Checkbox in datatable to populate the values in input hidden!
klermann
Posts: 277Questions: 67Answers: 1
Hello rf1234, I once asked myself a question about the same question. As I have a checkbox inside the datatable that does not have the same behavior as the Editor to populate the values, how do I solve this problem by clicking on the checkbox set the values in hidden fields?
https://datatables.net/forums/discussion/comment/131090#Comment_131021
This discussion has been closed.
Answers
you use and event handler that you put on the checkbox to update the data object associated with the row.
here is an example that adds all the rows that have been checked to a grand total
http://jsbin.com/joxiri/7/edit?html,js,output
Is this just for a checkbox? It is? I need to set values in other fields, which are hidden!
In @bindrid 's example, the checkbox is just triggering the function - in that trigger you can do whatever you like, such as setting visible or hidden fields. This sounds exactly like what you're after.