I created a Custom Dialog Window in Google Spreadsheet using Google App Script that looks like this:
How do I get the data from the window to my spreadsheet.
Here is my HTML code:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<form action="google.script.run.testing143()">
Task Number:<br>
<input type="text" name="taskNumber" value="">
<br><br>
Task Date:<br>
<input type="text" name="taskDate" value="">
<br><br>
Customer Name:<br>
<input type="text" name="customerName" value="">
<br><br>
Customer Site:<br>
<input type="text" name="customerSite" value="">
<br><br>
<select>
<option value="status">Status</option>
<option value="complete">Complete</option>
<option value="scheduled">Scheduled</option>
<option value="reschedule">Reschedule</option>
</select>
<br><br>
Status Date:<br>
<input type="text" name="statusDAte" value="">
<br><br>
Location:<br>
<input type="text" name="location" value="">
<br><br>
Description:<br>
<input type="text" name="description" value="">
<br><br>
<input type="submit" value="Submit">
</form>
<script>
function testing143(){
Logger.log('With Success') ///Doesn't work
var lmnt = document.getElementByName('usrname'); //Wrong
}
</script>
</body>
</html>
When I click 'submit' it takes me to an error 400 page. I can create a function that takes the data as a parameter like:
function getNewTask(number,date,status...)
Can I use document.getElement ? If so how is that done?
Your help is sincerely appreciated!
