1

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 :

enter image description here

and this is the list for the drop down from google sheet

enter image description here

can someone help me please

Rubén
  • 34,714
  • 9
  • 70
  • 166

1 Answers1

0

Google Forms, its not build to these kind of Thing. Options is only Texts. You could put a picture in the form with all images together.

Or build your own Form with Javascript. CSS, Html. using HtmlApp...
where you still use Spreadsheets as simple data backend. Mean Simple, means not for fast, reliable, many access app.