One of the features of Google Forms is that responses can be collected on a spreadsheet automatically. However, Google Sheets API makes it possible to achieve this using regular HTML forms, as well. You can view the responses to this form here: https://docs.google.com/spreadsheets/d/1mkTuLONELStkaLTAtSSAAtpY1JghQ3Sdwb6PjVM8PZc/edit
Your response has been recorded. You can view it on the above spreadsheet.
Below is the code that runs on Google Scripts, if you are interested in making your own form-less form.
function getSheep(){
return SpreadsheetApp.openById('1mkTuLONELStkaLTAtSSAAtpY1JghQ3Sdwb6PjVM8PZc').getSheetByName('Sheet1');
//important: change if moving this file or if renaming the sheet
}
function doPost(e) {
var lock = LockService.getScriptLock();
if (!lock.tryLock(10000)) {
Logger.log('Lock not obtained: '+new Date().toUTCString());
return HtmlService.createHtmlOutput("failure").setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
var sheep = getSheep();
var row = sheep.getLastRow()+1;
if(typeof e !== 'undefined'){
sheep.getRange(row, 1).setValue(new Date().toLocaleString('en-US', { timeZone: 'Pacific' }));
sheep.getRange(row, 2).setValue(e.parameter.data);
}
lock.releaseLock();
return HtmlService.createHtmlOutput("success").setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}