# Form Creation Demo

## Source Code

```javascript
function createFormDemo() {
  // name of the Form
  var form = FormApp.create('Google Apps Script for Educators Session')
  // creates a new item of the Form
  // creates paragraph items
  var item = form.addParagraphTextItem();
  item.setTitle('Name');
  form.addParagraphTextItem()
  .setTitle('Email:');
  
  // Multiple Choice Item
  form.addMultipleChoiceItem()
  .setTitle('What state are you in?')
  .setChoiceValues(['Georgia','Indiana','Michigan','New Jersey','Ohio','Pennsylvania']);
  form.addMultipleChoiceItem()
  .setTitle('How many years have you been teaching?')
  .setChoiceValues(['Student Teaching 😇','First Year! 😅','2 😉','3 😌','4 🤠','5 😷','6 🤔','7 🤖']);
  form.addMultipleChoiceItem()
  .setTitle('Computer Science Experience')
  .setChoiceValues(['None','Some','Expert'])
  form.addParagraphTextItem()
  .setTitle('What would you like to learn in this session?')
  
  // Logger Output
  Logger.log('Form URL: ' + form.getPublishedUrl());
  Logger.log('Editor URL: ' + form.getEditUrl());
  
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.appsscript.org/form-creation-demo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
