使用表单中的数据来表单 [英] Using data from sheet for form

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

问题描述

我有一个使用脚本创建表单(调查)的Google表单。在该表中,我为x个用户分配了唯一的用户ID(例如DR8371或JH3059),以帮助跟踪谁接受了调查以及他们的答案是什么(这不是匿名的)。但是,我无法弄清楚如何将用户标识从表单附加到表单(表单中包含表单响应)。表单上的第一个问题询问用户的ID是什么,除非用户ID正确,否则我不希望表单提交回复。有没有办法做到这一点?用户ID需要保留在我目前已存储的工作表中。

>预先填写 Google表单中的输入字段,并将生成的预填充网址分发给正确的用户。但是,用户总是可以删除或更改该值。没有隐藏的字段类型来防止这种情况发生。此外,隐藏用户无法导航的页面上的输入字段似乎会返回该字段的空响应,而不是保留预先填充的值。



您可以在该字段的高级验证中使用正则表达式作为支票以确定身份证是否与您想要的范围或确切人数相符。但是,我们目前无法通过脚本设置或更新任何验证(请参阅并投票选择 Issue 4216 ),所以你不得不继续手动操作。



填充ID由用户更改,这可能需要为每个用户创建一个单独的Google Form,并使用高级验证设置来匹配1个ID。

脚本无法在用户填写表单时检查ID是否正确。有关详情,请参阅此文章

I have a google sheet where I've created a form (survey) using scripting. In that sheet, I've assigned x number of users a unique user id (e.g. DR8371 or JH3059) to help keep track of who's taken the survey and what their answers are (this is not meant to be anonymous). However, I can't figure out how to attach the user id from the sheet to the form (the sheet contains the form responses though). The first question on the form asks what the user's ID is, and I don't want the form to submit the responses unless the user ID is correct. Is there a way do this? The user ID's need to stay on the sheet where I currently have them stored.

解决方案

You can prefill an input field in a Google Form with the ID and distribute the resulting pre-filled URL out to the right user. However, the user can always delete or change the value. There are no hidden field types to protect against that either. Also, hiding a input field on a page the user can't navigate to seems to return an empty response for that field instead of keeping the pre-filled value.

You could use a regular expression in the field's advanced validation as a "check" to whether the ID matches a range or the exact number you want. However, we can't currently set or update any validation via scripts ( see and vote for Issue 4216 ) so you would have to keep doing that manually.

If you absolutely want to prevent a pre-filled id from being changed by the user, that may require creating a separate Google Form for each user with advanced validation setup to match just 1 id.

There's also no ability to for a script to "check" whether the ID is right as the user fills out the form. See this post for more on that.

这篇关于使用表单中的数据来表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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