actual response (since the response has already been submitted). For GridItem questions, this returns a String[] array in which the answer at For most types of question items, this returns a Object — a String or String[] or String[][] of answers to the question Newly created Google Workspace domains might be temporarily subject to stricter responses that have already been submitted, and only affects stored grades once they are Ask a question under the google-apps-script tag. Java is a registered trademark of Oracle and/or its affiliates. Scripts that use this method require authorization with one or more of the following scopes: Gets the question item that this response answers. Item responses can be accessed from FormResponse and created from any Item that asks the respondent to answer a question. form response. A null value will clear the existing Date — the timestamp at which this response was submitted, or null if the script ... A response to one question item within a form. Gets the item response contained in a form response for a given item. created this response but has not yet submitted it. To view the daily quotas for conversions, see Quotas for Google Adds the given item response's grades to a form response. value), even if there isn't an actual response. multiple times for the same item, only the last grade is retained. score. DateItem, TimeItem, or ParagraphTextItem, the ItemResponse Java is a registered trademark of Oracle and/or its affiliates. This method does not actually save the feedback in Forms until Form.submitGrades(responses) is called with the updated FormResponses. Generates a URL that can be used to edit a response that has already been submitted. String — the URL for a form with pre-filled answers. Determines whether the form displays a link to edit a response after submitting it. String — the URL to change a submitted response. Gets the raw binary content of an HTTP response. This method works similarly to getItemResponses(), but to allow for grading ItemResponse[] — an array of responses to every question item within the form for which the respondent To get you started, you can open up the script editor in the Google Form, then past this function into the code editor: function logFormResponse(e) {var responses = e.response.getItemResponses().map(function(item){ return item.getResponse()}); Logger.log(responses)} no grades, this method will remove grades for the item. google.script.history (client-side) google.script.host (client-side) google.script.run (client-side) google.script.url (client-side) HtmlService; Classes. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. Generates a URL for the form in which the answers are pre-filled based on the answers in this Returns an attribute/value map of headers for the HTTP response, with headers that have Integer — HTTP response code (e.g. This method returns null if the form response has not Return. Scripts that use this method require authorization with one or more of the following scopes: Gets all item responses contained in a form response, in the same order that the items appear This class allows users to access specific information on HTTP responses. FormResponse — a newly created response saved to the form's response store. Gets the email address of the person who submitted a response, if the. ... For a form response that the script has created but not yet submitted, this method returns null. Object — a JavaScript key/value map of HTTP headers. Gets all item responses contained in a form response, in the same order that the items appear Authorization String. response for any other item type, this method excludes that item from its returned array. The order of the strings in the array may vary. This the answers submitted by a respondent (see getItemResponses()), to programmatically responder's choices. This method does not actually save the score in Forms until Form.submitGrades(responses) is called with the updated FormResponses. If the assumes that the part of the filename that follows the last period (if any) is an existing Ask a question under the google-apps-script tag. that the script has created but not yet submitted; it cannot affect stored responses. If a respondent did not answer a question in the grid, that answer is returned as ''. String — the ID of the form response, or null if the form response has not been The MIME type to convert to. Adds the given item response to a form response. null. However, if the Item isn't gradable, instead of the email address of the original respondent. Gets the answer that the respondent submitted. Item — the question item that this response answers. A response to a prompt dialog displayed in the user-interface environment for a Google App. This method applies only to form responses Sets the score for the respondent's submitted answer. If the Form.setCollectEmail(collect) setting is enabled, the form records the email address of the user who edited the response If this of an HTTP response. The latest news on the Google Workspace Developers blog, Ask a question under the google-apps-script tag, Check out the Apps Script videos on YouTube, Sign up for the Google Developers newsletter. submitted. Script Editor Apps Script Dashboard Connect. String — the content of the HTTP response, as a string. Return the data inside this object as a blob converted to the specified content type. item. However, it Return the data inside this object as a blob converted to the specified content type. Object — a Double representing the score for the question item. Sets the score for the respondent's submitted answer. Gets the timestamp for a form response submission. Java is a registered trademark of Oracle and/or its affiliates. in the form. Byte[] — the content as a raw binary array. However, if the If the form response omits a See setScore() for an example. This method works provided an answer. Gets the ID of the form response. FormResponses can be created or accessed from a Form. can be graded (ie has a point value), even if there isn't an actual response. method adds the appropriate extension to the filename—for example, "myfile.pdf". grid. Gets the email address of the person who submitted a response, if the Form.setCollectEmail(collect) setting is enabled. Gets the feedback that was given for the respondent's submitted answer. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. The latest news on the Google Workspace Developers blog, Ask a question under the google-apps-script tag, Check out the Apps Script videos on YouTube, Sign up for the Google Developers newsletter. did not answer a question in the grid, that answer is returned as ''. FormResponse — this FormResponse, for chaining. For CheckboxGridItem questions, this returns a String[][] array in which the "ShoppingList.12.25.pdf". If this method is called submitted. Anyone who visits the link can edit the Videos Check out the Apps Script videos on YouTube. content. Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. extension that should be replaced. 200 for OK). Gets the answer that the respondent submitted. For details, see the Google Developers Site Policies. similarly to getResponseForItem(item), but to allow for grading a missing answer, it still method is called multiple times for the same item, only the last item response is retained. For our purposes, GET requests are made of up of a domain, e.g., example.com a path, e.g., /fruits/apples/ and often a query string e.g.,?variety=fuji&count=4With Google Apps Script, the domain will always be script.google.com, and the path will always look with something like /macros/s/AKf...ycb/exec (or /dev), and the query string can be whatever you want it to be, in order to specify how the web app … quotas. This method applies only to form returned for that item will have an empty string as the response. String — the email address of the person who submitted this response, if available, or null if the script created this response but has not yet submitted it. Videos Check out the Apps Script … Form.setAllowResponseEdits(enabled) setting is disabled, the link leads to a page that The latest news on the Google Workspace Developers blog, Ask a question under the google-apps-script tag, Check out the Apps Script videos on YouTube, Sign up for the Google Developers newsletter. Return the data inside this object as a blob. ItemResponse — a ItemResponse for chaining. A response to the form as a whole. ItemResponse[] — an array of responses to every question item within the form for which the respondent explains that editing form responses is disabled. been submitted. If the ItemResponse contains Gets the item response contained in this form response for a given item. a missing answer, it still returns an ItemResponse if the corresponding Item Throws a scripting exception if the response has already been submitted. Consequently, "ShoppingList.12.25.2014" becomes google.script.history (client-side) google.script.host (client-side) google.script.run (client-side) google.script.url (client-side) HtmlService; Classes. Returns the content of an HTTP response encoded as a string of the given charset. answers at row index n corresponds to the question at row n + 1 in the checkbox Returns an attribute/value map of headers for the HTTP response. Regardless of this setting, the method FormResponse.getEditResponseUrl() allows a script author who has edit access to the form to generate a URL that can be used to edit a response.. Return. Gets all item responses contained in a form response, in the same order that the items appear index n corresponds to the question at row n + 1 in the grid. Adds the given item response to a form response. in the form. Gets the item response contained in a form response for a given item. For a form response that the script has created but not yet submitted, this method returns Adds the given item response's grades to a form response. Get the HTTP status code (200 for OK, etc.) Services. This method also only updates the item response's grades; it does not affect the Tools. If a respondent ItemResponse — the response for a given item, or null if none exists and the item is ungraded. Item isn't gradable, this method excludes that item from its returned array. submit a response to the form (see withItemResponse(response) and submit()), and to generate a URL for the form which pre-fills fields using the provided Gets the content of an HTTP response encoded as a string. returns an ItemResponse if the corresponding Item can be graded (ie has a point in the form. Gets the score for the respondent's submitted answer. Sets the feedback that should be displayed for the respondent's submitted answer. String — the URL to change a submitted response.