We have a Google bug reporting form we are deprecating. I want to redirect our users to the new form when they land on the old form site.
I've created GAS script on the old form and tried several things I found in this SO question to redirect to the new form:
function myFunction() {
//window.location = [new bug form URL]; //doesn't work
//window.location.replace([new bug form URL]); //doesn't work
return HtmlService.createHtmlOutput([new bug form URL]); //doesn't work
}
I've also set a trigger to run myFunction, "From form", "On Open" and I can see in:
View > Execution Transcript
that the script is being run, but nothing happens.
[13-10-24 13:42:11:324 PDT] Starting execution
[13-10-24 13:42:11:327 PDT] HtmlService.createHtmlOutput([new bug form URL]) [0 seconds]
[13-10-24 13:42:11:328 PDT] HtmlOutput.toString() [0 seconds]
[13-10-24 13:42:11:328 PDT] HtmlOutput.getContent() [0 seconds]
[13-10-24 13:42:11:328 PDT] HtmlOutput.getTitle() [0 seconds]
[13-10-24 13:42:11:329 PDT] Execution succeeded [0.0 seconds total runtime]
Got any idea what I'm doing wrong? I can find lots of examples for doing things in a Google Form upon submittal, but not on landing.
I know that I can simply stop accepting responses on the old form, but the problem is that we have a number of people on the production floor who don't check email regularly and they know where the old form is. I just want to automate taking them to the new form if possible.