Javascript 如何在Google表单中添加动态字段?

Javascript 如何在Google表单中添加动态字段?,javascript,jquery,google-apps-script,google-forms,Javascript,Jquery,Google Apps Script,Google Forms,谷歌表单中是否有任何功能 我正在使用谷歌应用程序脚本创建一个调查问卷应用程序,问题和答案将从我的管理面板设置,管理员将决定有多少问题。如果表单旁边有一个+可以自动加载表单下的另一个文本框,那就太完美了。我找到了一个完美的理由,为什么它不能在谷歌表单中添加动态字段,因为谷歌表单应用程序完全与电子表格绑定在一起 所有表格都有单独的电子表格 因此,不可能在Google表单中生成动态字段,因为它与电子表格有着强烈的关联 这可以说是谷歌表单和电子表格之间的静态关系。我认为您需要构建一个新页面,使用jQue

谷歌表单中是否有任何功能


我正在使用谷歌应用程序脚本创建一个调查问卷应用程序,问题和答案将从我的管理面板设置,管理员将决定有多少问题。如果表单旁边有一个+可以自动加载表单下的另一个文本框,那就太完美了。

我找到了一个完美的理由,为什么它不能在谷歌表单中添加动态字段,因为谷歌表单应用程序完全与电子表格绑定在一起

所有表格都有单独的电子表格

因此,不可能在Google表单中生成动态字段,因为它与电子表格有着强烈的关联


这可以说是谷歌表单和电子表格之间的静态关系。

我认为您需要构建一个新页面,使用jQuery和JSON以及谷歌电子表格数据API提交到谷歌电子表格 是的,您可以使用表单服务以编程方式创建/编辑表单

注意:此时不可能根据用户输入对表单/问题进行更改,例如进行级联下拉列表

扩展答案 以下是将每个问题类型添加到Google表单的具体方法

Method Return type Brief description -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- addCheckboxItem() CheckboxItem Appends a new question item that allows the respondent to select one or more checkboxes, as well as an optional "other" field. addDateItem() DateItem Appends a new question item that allows the respondent to indicate a date. addDateTimeItem() DateTimeItem Appends a new question item that allows the respondent to indicate a date and time. addDurationItem() DurationItem Appends a new question item that allows the respondent to indicate a length of time. addGridItem() GridItem Appends a new question item, presented as a grid of columns and rows, that allows the respondent to select one choice per row from a sequence of radio buttons. addListItem() ListItem Appends a new question item that allows the respondent to select one choice from a drop-down list. addMultipleChoiceItem() MultipleChoiceItem Appends a new question item that allows the respondent to select one choice from a list of radio buttons or an optional "other" field. addParagraphTextItem() ParagraphTextItem Appends a new question item that allows the respondent to enter a block of text. addScaleItem() ScaleItem Appends a new question item that allows the respondent to choose one option from a numbered sequence of radio buttons. addTextItem() TextItem Appends a new question item that allows the respondent to enter a single line of text. addTimeItem() TimeItem Appends a new question item that allows the respondent to indicate a time of day. 另见
此时,向Google电子表格提交Google表单响应是可选的,并且可以根据电子表格数据创建或更新Google表单。看见