问题
If I have a Google Form, how might I use Apps Script to:
1.) Get the user's responses to questions on one page of the form
- INTERJECT SCRIPT LOGIC
2.) (pause) the form and have the script activate to:
- process their results
- depending on the result of that processing, move them to a different page
Basically, I want to have the script analyze the results of a particular page, and redirect them to a new page depending on the results to multiple answers. There is a redirect utility in the form itself, but it only works for the result of one question. I have two questions that I need to ask, and based on both of those answers, move them to a new page.
I know that I can create Item
s that have a PageNavigationType
as seen here, however, this is for a single item only. There is also no setPageNavigationType
for Item
s, so I'm wondering if this is even possible to do dynamically as a user is filling out the form?
回答1:
Hate to be the one to give the bad news, but that's not possible.
Google Apps Script only helps with the Form creation process (and editing), it's not possible to do anything while the user is filling it, period.
Also, it can only do programatically what you can do manually on the Form interface, it's useful only to help you automate things that would be cumbersome to do manually. For example, adding a long list of options to a question, or helping you generate and email hundreds of similar Forms. Or just really creating quick quizzes or some other forms that you have to create every week, etc.
Just to be completely clear to other users that might read this. It's not possible to do anything with Apps Script for Google Forms that you can't already do manually. Apps Script does not add any new or hidden features to Google Forms.
来源:https://stackoverflow.com/questions/19695489/google-forms-script-to-move-user-to-new-page-in-the-form