Google表单中唯一的字段验证 [英] Unique field validation in Google forms

查看:110
本文介绍了Google表单中唯一的字段验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Google表单,数据可以保存到电子表格中。现在我想在用户名字段中应用验证,以避免重复。如何在Google表单字段中使用Google脚本添加UNIQUE验证?

解决方案

我认为不可能为字段添加验证Google直接使用Google Apps脚本创建Google表单值。



如果用户名字段值与用户名相同,您可以考虑更改Google表单本身的设置登录访问该表单。您可以通过选中每个人只允许一个响应(必须登录)来做到这一点。



如果上述解决方案不适用于您的需求,则UiApp / Html Apps脚本中的服务将帮助您创建自定义表单。

您可以创建自定义表单并编写自定义函数以使用 SpreadsheetApp 类到数组中。在提交表单之前,请将Google表单中的用户名字段与我们在数组中获得的用户名单元格值列表进行比较,并检查唯一性。

希望有帮助!


Using Google forms, data can saved to the spreadsheet. Now i would like to apply validation in Username field for avoid duplication. How can add UNIQUE validation in google form field using Google script?

解决方案

I think it is not possible to add validation for fields in Google form values by using Google Apps Script direcly.

One thing you can consider to change the settings in the Google form itself, if the Username field value is same as the Username that logged in to access that form. You can do this by checking the "only allow one response per person(required login)".

If the above solution does not apply for your requirement, the UiApp/Html Service in Apps Script will help you in creating custom forms.

You can create a custom form and write a custom function to get the Username field values using SpreadsheetApp class into an array. Before submitting the Form, compare the Username field from Google form with the list of username cell values that we got in an array and check for uniqueness.

Hope that helps!

这篇关于Google表单中唯一的字段验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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