I have created a script that receives the POST of an HTML form, then updates a Google Sheets with the content of the POST. The script has been published "Deploy as web app ...". The form is defined as follows:
<form action="https://script.google.com/macros/s/AKfycbwjlImSal ... gUBK6hQnLTIWAwE/exec" method="post" id="frm">
and submitted as follows:
I also have created a form within an HTML document that submits (via POST) to the above script web app. I use the following code to display the HTML document within Google Docs:
html = HtmlService.createTemplateFromFile('Apartment') .evaluate() .setSandboxMode(HtmlService.SandboxMode.IFRAME); html.setHeight(750); html.setWidth(900); DocumentApp.getUi().showModalDialog(html, 'Apartment Inspection');
When I open the HTML document directly into my browser (Firefox), the POST executes as designed. The target sheet is updated. When I go through Google Docs using the above code, no submission occurs.
Is there a way to make this work?