【发布时间】:2019-02-08 21:51:21
【问题描述】:
我正在使用电子表格作为存储进行 PWA。当我想提交我的信息时,它在 Web(Chrome、Safari、Opera 等)上运行良好,它也像 Android 上的 PWA 一样运行。
但是当我在 Iphone/iPad 上添加应用程序时,当我尝试提交信息时,它会在 safari 上打开一个页面并向我显示此错误:
找不到脚本函数:doGet。
谷歌脚本
// spit out all the keys/values from the form in HTML for email
// uses an array of keys if provided or the object to determine field order
function formatMailBody(obj, order) {
return result; // once the looping is done, `result` will be one long string to put in the email body
}
function doPost(e) {
//operations with values from form
record_data(e);}
function record_data(e) {//operations}
这是我的 HTML 代码:
<form id="gform" class="pure-form pure-form-stacked" data-email="xxxxx@gmail.com" action="https://script.google.com/macros/s/xxxxxxxxxxxxxxxxxxxxx/exec" method="POST">
//Some inputs
<input type="hidden" id="de" name="de" value='nombre'>
<input type="hidden" id="tipopersona" name="tipopersona">
<input type="hidden" id="correo" name="correo" >
</form>
我想删除 doGet () 错误并按应有的方式执行其他代码,否则只知道在 iOS PWA 中导致该错误的原因。
【问题讨论】:
标签: ios web safari progressive-web-apps