With google forms and scripts is it possible to create a script which will limit the amount of points that user can give in all scale inputs?

不羁岁月 提交于 2020-01-16 13:23:32

问题


I have a form with 10 scale questions going from 1 to 10. I would like to give each user 30 points and if they select more than 30 totaling on all scales, disable the submit button and show notification.

I have added a script trough Tools->Script editor, but cannot find an example or trigger which would give me that kind of functionality.

Is it possible, or I have to write my own form template with custom javascript?

Tnx in advance


回答1:


Apps Scripts on Forms run in either the form editor or on the form submit. They do not run on the live form.

You could intercept the submit with the onSubmit trigger and check the values of the sliders, inform of the error, and have the user edit their answers.

When the users meets your criteria you can use the .submit() method to commit the checked response.



来源:https://stackoverflow.com/questions/28832126/with-google-forms-and-scripts-is-it-possible-to-create-a-script-which-will-limit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!