google apps script DateItem get dropdown box

Posted by user2117613 on Stack Overflow See other posts from Stack Overflow or by user2117613
Published on 2013-10-22T00:54:59Z Indexed on 2013/11/04 21:54 UTC
Read the original article Hit count: 214

Filed under:
|

So using Google Apps Scripts with a Form, I'm able to get all the items and iterate through them using the following:

var form = FormApp.getActiveForm();
var items = form.getItems();
  var item;

  for(var i = 0; i < items.length; i++)
  {
    item = items[i];

    if(item.getType() == FormApp.ItemType.DATE)
    {
      item = item.asDateItem();
      item.dropdown.month; // I need a method like this
    }
    Logger.log("ItemTitle: %s ItemType: %s",items[i].getTitle(), items[i].getType()) ;
  }

I can even get the DateItem that I want. My issue is that I cannot get the dropdown boxes from the DateItem. Does anyone know how to get the dropdown boxes from the DateItem? (Like: item.dropdown.month or item.dropdown.day, etc).

© Stack Overflow or respective owner

Related posts about date

Related posts about google-apps