简体   繁体   中英

Prefill Questions on a Google Form

I know how to prefill a Google form with answers/responses that are populated on a Google Sheet,

I wondered if there is a way to do this in reverse, so prefil a Google Form with not only the answers/responses but also the questions?

For example. Create a hyperlink form which populates Q1,Q3,Q5,Q6 and the response aligned, excluding Q2,Q4,Q7,Q8,Q9,Q10 from the form as they are blank

Appreciate any help on this

Thanks

在此处输入图片说明

Yes, you can achieve that by creating a Google Form programmatically using Apps Script. You can use SpreadsheetApp class for reading/manipulating the sheet and FormApp class to create and manipulate the Google Form.

You'd first need to get the values from the sheet using for example getValues() :

var values = SpreadsheetApp.getActiveSheet().getRange(2, 3, 6, 4).getValues();

And use those value to create the form using the create() method:

var form = FormApp.create('Form Name');

Then you'll have a Form object to which you can add question items depending on each question type you wish.

You can guide yourself from this other answer as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM