Question:
How do a pass the value (or state) of a checkbox created with Google's HTML service from the HTML (sidebar GUI in this case) to the Code.gs to perform a check against?
I have managed to pass all of the other data from here to the Code.gs. For example, the text box, the Date, the Text Area. However, as the checkbox has no "value" as such, I don't know how to pass the state.
My Code:
(Not entire script as it would be too big)
In the HTHML:
<input id="complete" name="complete" type="checkbox" />
<script type="text/javascript">
function formSubmit() {
google.script.run.transferUpdates(document.forms[0]);
}
</script>
In the Code.gs:
(Again not entire code file)
function transferUpdates(form1){
var ss = SpreadsheetApp.getActiveSpreadsheet(),
sheet = ss.getSheetByName('Action Plan'),
sheet2 = ss.getSheetByName('Problem Details'),
actionnum = form1.actionup,
desc = form1.description,
check = form1.complete;
Problem:
my problem is the "check" variable never has a value to compare as nothing is being passed over from the HTML form?
Does anyone have a solution to this?
(I am rather new to HTML so apologies if this is a simple answer)
Aucun commentaire:
Enregistrer un commentaire