I have a google spreadsheet with two google forms (form responses 1 and 2) being used for registration. I have a sheet called 'Registered' in which I need the new data entered in either form responses to be automatically copied to the 'registered' sheet onForm Submit. I created two functions below and setup triggers but it doesn't work. I'm a novice with this; Please kindly assist me with this. Thanks in advance
function copyRowsFromForm2(){
var responses = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Form Responses 2");
var projects = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Registered");
var lastrow = responses.getLastRow();
var col = responses.getLastColumn();
var row = responses.getRange(lastrow, 1, 1, col).getValues();
projects.appendRow(row[0]);
//copyValuesOnly(copyFromRange, copyToRangeStart);
}
function copyRowsFromForm1(){
var responses = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Form Responses 1");
var projects = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Registered");
var lastrow = responses.getLastRow();
var col = responses.getLastColumn();
var row = responses.getRange(lastrow, 1, 1, col).getValues();
projects.appendRow(row[0]);
//copyValuesOnly(copyFromRange, copyToRangeStart);
}