The base FeedbackBuilder that contains setters for properties common to all feedback, such as display text. Used to build Feedback objects.
// Open a form by ID and add a new list item. var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); var item = form.addListItem(); item.setTitle('Do you prefer cats or dogs?'); item.setChoices([ item.createChoice('Dogs', true), item.createChoice('Cats', false)]); // Add feedback which will be shown for correct responses; ie "Dogs". item.setFeedbackForCorrect(FormApp.createFeedback().setText("Dogs rule, cats drool.").build());
Methods
Method | Return type | Brief description |
---|---|---|
addLink(url) | QuizFeedbackBuilder | Adds a link to the feedback's supplemental material. |
addLink(url, displayText) | QuizFeedbackBuilder | Adds a link to the feedback's supplemental material. |
build() | QuizFeedback | Builds a Feedback of the corresponding type for this builder. |
copy() | QuizFeedbackBuilder | Returns a copy of this builder. |
setText(text) | QuizFeedbackBuilder | Sets the feedback text. |
Detailed documentation
addLink(url)
Adds a link to the feedback's supplemental material.
Parameters
Name | Type | Description |
---|---|---|
url | String | the link to display under the display text |
Return
QuizFeedbackBuilder
— this QuizFeedbackBuilder
, for chaining
addLink(url, displayText)
Adds a link to the feedback's supplemental material.
Parameters
Name | Type | Description |
---|---|---|
url | String | the link to display under the display text |
displayText | String | the text to display for the link |
Return
QuizFeedbackBuilder
— this QuizFeedbackBuilder
, for chaining
build()
copy()
setText(text)
Sets the feedback text.
Parameters
Name | Type | Description |
---|---|---|
text | String | the new text |
Return
QuizFeedbackBuilder
— this QuizFeedbackBuilder
, for chaining