1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Googleフォームで年齢をプルダウンの選択肢で作る方法

Last updated at Posted at 2021-07-04

結論

スクリプトエディタ
function addPrefListItem() {
  const form = FormApp.openById(''); // フォームのIDを指定
  var item = form.addListItem();
  item.setTitle('年齢') // フォームの質問のタイトル
  let choices = [];
  for(let i = 初めの年齢数字; i <= 終わりの年齢数字; i++) {
    choices.push( item.createChoice(i) )
  }
  item.setChoices(choices);
}

他のことにも応用できそうなので参考にしてください。

1
1
1

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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?