Assigned
Status Update
Comments
mi...@google.com <mi...@google.com> #2
Hello there!
I could reproduce this behaviour and I have reported it internally. Any updates about this will be communicated here.
Thank you.
ga...@capitalone.com <ga...@capitalone.com> #3
Any updates on this topic? I have the same issue when using ".asCheckboxItem()". Thank you!
ma...@gmail.com <ma...@gmail.com> #4
varformid="xxxxxxxxxxxxx
varformobj=formapp.openbyid(fromid);
varformresponse=formobj.createresponse();
varitems=formobj.getltems();
varitems=formobj.getltems();
varterritoryfield=territory.asmultiplechoiceitem0
varterritoryresponse=territoryfield.createresponse([["unitedstates"]]
formresponse.withitemresponse(territoryresponse);
varediturl=formresponse.submit0.geteditresponseurl0
componentid:327918
issueid:174303428
rh...@gmail.com <rh...@gmail.com> #5
The only problem is that when the answer in a multiplechoise question "Others" is filled with a text. This text is not given back in a prefilled form. When one of the other choises are chosen in the multiplechoise question this is working OK. So who knows how we get the answer after "Others" in a prefilled form?
is...@google.com <is...@google.com>
jp...@google.com <jp...@google.com>
ga...@capitalone.com <ga...@capitalone.com> #6
Have there been any updates on this issue since it was assigned last July? Thank you!
Description
Requirement : There should be a Google form for recording answers to various question. One question should be - "Select your country". This question should be Multiple Choice Question with two option:
Form Submission Requirement: We have to submit this form from Google App script. Form should be submitted with answer to question "Select your country". Answer to question "Select your country" should be Other (not United States). The radio button Other should be selected and in Other text box country should be mentioned as India. Note: This submission should happen from google app script. Below is the sample code used by me
code block
var formID = "xxxxxxxxxxxxxxxxxxxxxx"
var Formobj= FormApp.openById(formID);
var formResponse = Formobj.createResponse();
var items = Formobj.getItems();
var territory = items[1]
var territoryfield = territory.asMultipleChoiceItem()
var territoryresponse = territoryfield .createResponse([["India"]])
formResponse.withItemResponse(territoryresponse);
var editurl= formResponse.submit().getEditResponseUrl()
Problem Statement: If we submit the form using google app script for above mentioned scenario. After submission if we open form using edit link generated. The answer is not populated for the question "Select your country". Please refer screenshot other.jpg.
But if we try below given code and pass the answer to question as "United States". After submission if we open form using edit link generated. The answer is populated (United states radio button is selected). Refer attachment US.jpg
code block
var formID = "xxxxxxxxxxxxxxxxxxxxxx"
var Formobj= FormApp.openById(formID);
var formResponse = Formobj.createResponse();
var items = Formobj.getItems();
var territory = items[1]
var territoryfield = territory.asMultipleChoiceItem()
var territoryresponse = territoryfield .createResponse([["United States"]])
formResponse.withItemResponse(territoryresponse);
var editurl= formResponse.submit().getEditResponseUrl()