I am trying to send data from a form to a spreadsheet. I am sure it is on the clumsy side but it almost seems to be working. I have dumped it all in a JSFiddle here: JSFiddle of code
It works in as much as the form is sending to the spreadsheet but I am getting "on" for each and every checkbox irrespective of whether they are checked or not. Can someone please point me in the direction of why & where I am failing?
There are 40 checkboxes each similar to this:
<div class="vdcDiv">
<input type="checkbox" class="vdcCheck" id="cb01" />
<input type="text" class="vdcComment" id="tb01" disabled placeholder="01 Valid operator's licence"/>
</div>
and they are currently all getting in to the array. Is this incorrect or just clumsy?
var inpC01 = document.getElementById("cb01").value;
var arrayToPass = [inpDa, inpDe, inpFl, inpC01 ...etc]
The spreadsheet has 83 columns, 'DATE', 'DEPOT', 'FLEET', then 40 checkboxes, followed by 40 textboxes. They need to remain in this format.
Aucun commentaire:
Enregistrer un commentaire