cheapsteak
7/8/2014 - 9:52 PM

Get Google Form field names

Get Google Form field names

var fields = {};

[].slice.call($$('input[id^="entry_"]')).forEach(function (el) {
  var name = el.getAttribute('name');
  var label = el.getAttribute('aria-label').trim();
  fields[label] = name;
});

console.log(JSON.stringify(fields));