使用谷歌表格和脚本可以创建一个脚本,这将限制用户在所有缩放输入中可以提供的点数量? [英] 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?

查看:96
本文介绍了使用谷歌表格和脚本可以创建一个脚本,这将限制用户在所有缩放输入中可以提供的点数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格,其中有10个标度问题,从1到10。我想给每个用户30分,如果他们在所有标度上选择30个以上的总计,禁用提交按钮并显示通知。



我已经添加了一个脚本工具 - >脚本编辑器,但找不到能够提供这种功能的示例或触发器。



是否有可能,或者我必须用自定义javascript编写我自己的表单模板?



提前Tnx

解决方案

Forms上的Apps脚本可以在表单编辑器或表单提交中运行。他们不会在现场表格上运行。

您可以使用onSubmit触发器拦截提交,并检查滑块的值,通知错误并让用户编辑答案。

当用户符合条件时,您可以使用.submit()方法提交选中的响应。

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

解决方案

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.

这篇关于使用谷歌表格和脚本可以创建一个脚本,这将限制用户在所有缩放输入中可以提供的点数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆