Find id of element on already made google form?

后端 未结 2 889
小蘑菇
小蘑菇 2020-12-15 01:25

I have a form made on google docs, and I have a script that I\'ve just created (that isn\'t complete) that will analyze the responses on the form, and validate them based on

2条回答
  •  一整个雨季
    2020-12-15 01:38

    Something like this will show you the ids in the logger...

    var form = FormApp.getActiveForm();
    var items = form.getItems();
    for (var i in items) { 
      Logger.log(items[i].getTitle() + ': ' + items[i].getId());
    }
    

    To see the IDs manually in Chrome >> View Form >> right-click on the question Label >> Inspect element >> look for the for="entry_XXXXXXX" attribute. That 'xxxxxxx' will be the id.

提交回复
热议问题