How to capture multiple GET parameters with the same identifier in Google Apps Script

自作多情 提交于 2019-12-11 13:57:07

问题


I have a form deployed as a Web App through Google Apps Script and a couple fields allow you to select multiple values (ie. Like a multi-select dropdown). If I have multiple values with the same identifier in the GET request I only get the first one as a parameter in apps script.

How can I use apps script to capture multiple GET parameters with the same identifier?


回答1:


Figured this out.

In your doGet or doPost function, instead of calling e.parameter you need to call e.parameters to get multiple parameters with the same name as arrays.

Documentation: https://developers.google.com/apps-script/guides/web?hl=en#url_parameters



来源:https://stackoverflow.com/questions/34968911/how-to-capture-multiple-get-parameters-with-the-same-identifier-in-google-apps-s

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