The following Apps Script uses the Html Service, behaves as expected and displays the response page after the submit button is clicked.
The Problem: If the Apps Script is included into a Google Site (via Insert > Apps Script Gadget) and the form is submitted, the response page doesn't show – nor an error message.
Code.gs
function doGet() {
return HtmlService.createTemplateFromFile('myForm').evaluate();
}
function doPost() {
return HtmlService.createTemplateFromFile('myResponse').evaluate();
}
myForm.html
<html>
<body>
<form action="https://script.google.com/a/macros/.../exec" method="post">
<input type="submit" value="Submit">
</form>
</body>
</html>
myResponse.html
<html>
<body>
<h3>Hello World!</h3>
</body>
</html>