Google ドキュメント フォームを作成し、Google スクリプト ガジェットを作成して、データをフォームのスプレッドシート バックエンドに投稿し、カスタムhtml5
確認ページを返しました。
HTMLService
スクリプト コードでdoPost(e)
とを使用doGet(e)
し、ガジェットで 2 つの HTML ファイル (フォームと確認 HTML ファイル) も作成しました。
データを正しいスプレッドシートに書き込むガジェット。ただし、ガジェットで作成した正しい確認 HTML ファイルが返されません。Google ドキュメント フォームの一部である確認ページを返しています。doPost
私のコードの一部の抜粋を以下に示します。Googleドキュメントの代わりに作成したカスタム確認htmlファイルを返す方法を知っている人はいますか?
function doPost(e) {
var template = HtmlService.createTemplateFromFile('confirm.html');
template.entry_0 = e.entry_0;
template.entry_1 = e.entry_1;
template.entry_2 = e.entry_2;
template.entry_3 = e.entry_3;
template.screenshot = e.parameter.screenshot;
return template.evaluate();
}
私の form.html ファイルのフォーム アクション コード行は以下のとおりです。
<form action="<?= "https://docs.google.com/spreadsheet/formResponse?formkey=$mungedformkey" ?>" method="post">