I'm trying to create a table with editable cells in a google form that lets people enter their recorded measurements. Then compile that information into a Google Sheet by specified columns.
I have tried the Awesome table but I cannot seem to get the script to work.
Broken Down, I need the Script to be able to:
This may be a simple question that I am overthinking. But I am trying to avoid multiple questions on the same form, and think a table would be way easier.
As talked in the comments, since there is no table item in FormApp , this solution consists in sending a Sheet with a predefined table for users to fill. They will press a button and send the data to a master sheet.
CODE
function sendData() {
//Gets the sheet is being edited
var sprsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = sprsheet.getActiveSheet();
//Gets the data introduced by the user
var range = sheet.getRange("A2:L2");
var values = range.getValues();
//Gets the target sheet
var mainsprsheet = SpreadsheetApp.openById("main sheet id");
var targetSheet = mainsprsheet.getActiveSheet();
//Adds a new row to the target sheet with the collected data
targetSheet.appendRow(values);
//Clear the cells (optional)
range.clearContent();
}
BUTTON
To create the "submit" button to run the function above:
sendData
You can place the button anywhere and resize it.
NOTES
REFERENCES
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.