0
votes

I am using google app script to create a form for uploading file. This is my Code.gs file:

var SPREADSHEET_FILE_ID = '1oQn6OLMzys8tVk1FLriOAmpzFJNazLRP-SwM7--eA58';
var folderId = "0B9TN_-yt-h0WZ0dnWndGWkw3UkE";

function doGet() {
  var template = HtmlService.createTemplateFromFile('index');

  // Build and return HTML in IFRAME sandbox mode.
  return template.evaluate()
      .setTitle('Web App Window Title')
      .setSandboxMode(HtmlService.SandboxMode.IFRAME);
};

And I am using all other codes almost similar to the url https://script.google.com/d/125dG42eB9lM4SPq64p0dpR2CBH4ohfHiqu9TvFNM8s4Ra7pt-7kHXoTM/edit?usp=sharing. I am getting the following error.

3402363213-mae_html_user_bin_i18n_mae_html_user.js:42 Uncaught ReferenceError: "doc" is not defined.

enter image description here Can anyone please help why this error is coming and how to prevent this. No for is not being submitted. It is hanged after I click the button of submission.

1
Have you resolved this?noogui

1 Answers

0
votes

Since the problem started when you added these values, I think you need to recheck them.

var SPREADSHEET_FILE_ID = '1oQn6OLMzys8tVk1FLriOAmpzFJNazLRP-SwM7--eA58';
var folderId = "0B9TN_-yt-h0WZ0dnWndGWkw3UkE";

var SPREADSHEET_FILE_ID is expecting an spreadsheet ID like "1386834576" where as you provided "1oQn6OLMzys8tVk1FLriOAmpzFJNazLRP-SwM7--eA58", which is wrong. I think you got that from something like "https://docs.google.com/forms/d/1BqxyEG8RhtlM3MNuSbln6C1L1GLl3axdiSEijcwB5gY/edit" that's why it's asking you "doc" is not defined.