Prefill a Google Form using data from the last response

岁酱吖の 提交于 2019-12-04 19:59:02

There is both an On Form Submit and On Open trigger. In the Apps Script code editor, click on the Resources menu. Create an Apps Script that is tied to the form. There is a Tools menu in the Form Editor. Use the Tools menu to open the Apps Script code editor.

So, retrieving the last value from the spreadsheet is doable. I can't find anything that makes me think you can pre-fill a form field. But I hope I'm wrong, and somebody has the answer.

You could have a script that simply writes the last value to the new row if a certain response field is empty. So instead of pre-filling the field, just leave it empty if you want the same value written. Although, if you don't know what that value is, you might not know if that's what you want entered again.

There is a way to deal with that though. You could write the last value in the spreadsheet into the help text of the form item.

Google Documentation - Form Set Help Text

So, you could know what the last value was by looking at the help text.

Or I'm wondering if you could set the choices in a List Item:

Google Documentation - Set Choices

If you want to do more work, and learn HTML, you can do what you want with an HTML app.

Google Documentation - HTML Service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!