Insert image in multiplechoiceitem in Google Forms with Google Apps Script

血红的双手。 提交于 2020-07-31 04:08:06

问题


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')
]);

回答1:


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.



来源:https://stackoverflow.com/questions/51427821/insert-image-in-multiplechoiceitem-in-google-forms-with-google-apps-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!