i have a working script that generate drop down list from google sheets to google forms but i need that with every item from the list comes with the picture from google sheets from the right cell
the script that generate the drop down list on every edit :
function updateForm(){
// Forms ID
var form = FormApp.openById("1JLcyEapPsJIKGyYWD-IzFMZyqsZQWOntYl5T5ZmrTqM");
// question ID forms data-item-id
var namesList = form.getItemById("367152155").asListItem();
var ss = SpreadsheetApp.getActive();
// Tab name from sheet
var names = ss.getSheetByName("hamma");
// grab the values in the first column of the sheet - use 2 to skip header row
var namesValues = names.getRange(2, 1, names.getMaxRows() - 1).getValues();
var hamma = [];
for(var i = 0; i < namesValues.length; i++)
if(namesValues[i][0] != "")
hamma[i] = namesValues[i][0];
namesList.setChoiceValues(hamma);
}
i need the result to be like that :
and this is the list for the drop down from google sheet
can someone help me please