Google Form + Apps脚本onEdit [英] Google Form + Apps Script onEdit

查看:158
本文介绍了Google Form + Apps脚本onEdit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个Google表单,可将​​数据输出到电子表格.我为电子表格的onEdit函数编写了一些代码,以删除电话号码的所有非数字字符.如果我直接编辑电子表格,则效果很好,但是当通过表单输入数据时,似乎不会触发onEdit事件.我需要对表单进行处理,以使其从Spreadhseet上的onEdit触发吗?

So, I have a Google Form that outputs the data to a Spreadsheet. I have written some code for the onEdit function of the Spreadsheet to strip out all non-numeric characters for phone numbers. This works just fine if I edit the spreadsheet directly, but when data is entered via the form it doesn't look like the onEdit event is firing off. Is there something I need to do with the form to get it to fire off the onEdit on the Spreadhseet?

推荐答案

表单提交有一个特殊的触发器,称为

There is a special trigger for form submission called on Form Submit that you should install from the ressource menu in the script editor.

根据您的实际代码,您可能需要更改脚本中的一些内容,但也可能会使用与onEdit相同的功能.

Depending on your actual code you might need to change a few things in your script but it might also be possible to use the very same function you use with onEdit.

如果您想获得更准确的答案,请考虑显示您的代码.

Please consider showing your code if you want a more accurate answer.

这篇关于Google Form + Apps脚本onEdit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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