Hello, I have to build a multi question survey app for my M.S. degree and would like if anyone would be so kind as to give some indications how I should proceed. My thought on this is collecting information from users then sending it to a Google Spreadsheet , do you think this is a good approach or I should look at another option?
Hi, I have been experimenting with a very simple design trying to send CheckBoxes data to a Google spreadsheet, I have given all necessary permissions to my spreadsheet, also I have written a script to handle the process though I cannot make it work.
Here is my script and my blocks, could you please give me an idea what should be corrected?
function doGet(e) {
return handleRequest(e);
}
function doPost(e) {
return handleRequest(e);
}
function handleRequest(e) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const data = e.parameter;
Thank you very much, I have modified my script and my blocks and still I cannot get it to work, here is my script an my blocks, could you please take a look at them?
function doGet(e) {
return handleRequest(e);
}
function doPost(e) {
return handleRequest(e);
}
function handleRequest(e) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const data = e.parameter;
Thank you very much for response, I am trying to make a survey app, that is I have several check boxes corresponding to different questions, some of these check-boxes won't have a response while others will be checked, only true values should be sent to the spreadsheet, is my approach correct?
I have rearranged my blocks and tested my script and still I can't send my checked values to my spreadsheet, when I run my script with its URL I don't see any error messages, though when I run the script on the editor I get the following message:
TypeError: Cannot read properties of undefined (reading 'parameter')
Here is my script, my blocks and an image of the spreadsheet, could you please give me some indication as to what I should change?
function doGet(e) {
return handleRequest(e);
}
function doGet(e) {
handleRequest(e);
}
function doPost(e) {
handleRequest(e);
}
function handleRequest(e) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const data = e.parameter;
sheet.appendRow([data.checkbox1, data.checkbox2]);
return ContentService.createTextOutput("Success");
}
You are awesome! now I can send my data to my spreadsheet, I'll just keep working on it, once it is finished I'll share it so everyone can benefit from it.