Use 'Select' tool (with checkboxes) - as a form field?

Use 'Select' tool (with checkboxes) - as a form field?

CHewerCHewer Posts: 12Questions: 4Answers: 0

Hello,

I'm currently using datatables with a formfield in the left-most column and using it as an array - which works fine - when the form is posted all of the line id's are passed through... however, i'd like to use the select add-on instead as i like the way it tells you how many rows are selected and highlights the data -

This is my table iniator:

$(document).ready(function() { var table = $('#Data').DataTable({ columnDefs: [{ orderable: false, className: 'select-checkbox', targets: 0 }], "responsive": true, "pageLength": 12, "searching": true, "lengthMenu": [ [12,100, -1], [12, 100, "All"] ], "select": { style: 'multi', selector: 'td:first-child' } }); });

Which visbly works fine - but if I put this table within a form, and have a submit button at the bottom - how can i retrieve the data as an array? if thats possible, what data is passed - ideally i'd like to pass data from another field as the array data.

AJAX / on the fly changes are not something i want - nothing should happen until the user submits the form.

Is this something that can easily be done, or am i better off sticking with plan a (adding an html form field into col 1, avoiding select)?

Thanks

Answers

This discussion has been closed.