0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GASでフォームを作成するとき、メールの収集を「確認済み」(Verified)にしたい

Posted at

はじめに

こんにちは、ユーゴです。今回は、GASについて紹介します。

課題

GASでフォームを作成するとき、「デフォルトでメールアドレスを収集する」の設定を「確認済み」(Verified)にしたい。

gas_form_verified_00.png

しかし、以下のコードでは「回答者からの入力」になってしまう。

let form = FormApp.create(title);
form.setCollectEmail(true);

解決

setCollectEmailメソッドと併用して、setEmailCollectionTypeメソッドを使用する。

let form = FormApp.create(title);
form.setCollectEmail(true).setEmailCollectionType(FormApp.EmailCollectionType.VERIFIED);

公式リファレンスがないの何故...
GASエディタ上の補完から発見しました。

gas_form_verified_01.png

まとめ

いかがだったでしょうか。今回は、GASからメールアドレスの収集を確認済みにする方法を紹介しました。解決には、公式リファレンスにはないものの、内部的に存在しているメソッドを活用しました。
このように、GASの紹介から、Unity, AWS, 量子コンピューティングなど、幅広い知見の紹介をしております。お役に立てましたら、いいね, フォローなどよろしくお願いします!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?