Currently using the below app script function to update one column of data into one section of my google form. However, I want to write a code where I can update multiple rows of data into multiple sections of the google form.
Example: Column 1 update to Section 1, Column 2 update to Section 2 and etc..
function updateForm(){
// call your form and connect to the drop-down item
var form = FormApp.openById("Form Id");
var namesList = form.getItemById("Dropdown List ID").asListItem();
// identify the sheet where the data resides needed to populate the drop-down
var ss = SpreadsheetApp.getActive();
var names = ss.getSheetByName("Sheet Name");
// grab the values in the first column of the sheet - use 2 to skip header row
var namesValues = names.getRange(2, 10, names.getMaxRows() - 1).getValues();
var shopperNames = [];
// convert the array ignoring empty cells
for(var i = 0; i < namesValues.length; i++)
if(namesValues[i][0] != "")
shopperNames[i] = namesValues[i][0];
// populate the drop-down with the array data
namesList.setChoiceValues(shopperNames);
}