我已经按照https://kh-samples.googlecode.com/svn/trunk/code/instructions.html的指令将google表单连接到了一个融合表。
当用户填充表单时,将在融合表中插入新行。
但是,我向用户提供了一个带有复选框的问题--如果选择了多个复选框,对于每个选项,我希望插入一个单独的行。
示例:
在融合表中,我得到了
我想要:
这主要是因为需要在网络中表示内容。
我真的很感谢你的反馈/帮助
最好的
发布于 2013-04-05 03:28:14
您应该能够通过修改正在使用的脚本来实现这一点。如果您查看onFormSubmit函数,这就是从提交的数据创建一行的内容。根据列表中以逗号分隔的项的数量,可以修改脚本以生成多行。
一个快速的例子模型:(我已经假定了一个“兴趣”的列名)
function onFormSubmit(e) {
...
// The values entered into the form, mapped by question.
var interests = e.nameValues['interest'].split(',');
for (i in interests)
{
var formValues = e.namedValues;
formValues['interest'] = interests[i];
// Insert the data into the Fusion Table.
var rowId = createRecord(formValues);
if (!rowId) {
rowId = -1;
}
insertRowId(rowId, row);
}
}https://stackoverflow.com/questions/11269040
复制相似问题