Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Forms - Inserting an image in a multiple choice field using Apps Script [duplicate]

I need to insert a Google Drive image in each choice of the multiple choice item. Upon checking the documentation, the Class .addMultipleChoiceItem() doesn't support the method .setImage(). Is there another way to insert an image from Google Drive?.

Example:

var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
var item = form.addListItem();
item.setTitle('Do you prefer cats or dogs?')
.setChoices([
    item.createChoice('Cats'), <------ I need to insert an imagen of a cat 
in this choice with code.
    item.createChoice('Dogs')
]);
like image 959
Luis Torres Avatar asked Nov 18 '22 19:11

Luis Torres


1 Answers

Based from this link, you can add image for multiple choice using the Google Form UI. But in the Apps Script, you can only add text. This is also filed as a feature request.

like image 111
abielita Avatar answered Jan 10 '23 12:01

abielita