google-form

Dynamic selection options in Google Apps Script for forms

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 23:25:09
问题 I have this form: If you see List Items - Student Name and Grades are getting populated from a Google Sheet. What I want to do now is upon selection of List Item Grade, show only those students that belong to that particular grade in the "Select Student" selection... How can it be done, because form has only two triggers: onOpen and onEdit? 回答1: As far as I know, this type of client side event does not exist in Google Forms. The scripting mechanisms of Google Apps Script are designed for

How to add “Edit Response” link to Google Forms emails?

为君一笑 提交于 2019-11-26 22:46:19
问题 I have a simple Google Form that collects data, and, using AppScript, sends confirmation emails to users who fill it out. After user submits the form, on confirmation, s/he will see a link to edit his/her response. I'd like to include that link as a part of the confirmation email (Right now, it only shows up on the page.) How can I obtain the URL to edit a submitted response? I am able to get the link to the Form through SpreadsheetApp.getActiveSpreadsheet().getFormUrl() . It gives me the

Old Google Form redirect after submission

六眼飞鱼酱① 提交于 2019-11-26 22:21:58
问题 I am looking for a solution (code) how to redirect user to a custom thank you page (not default Google's) after submitting the form with Old Google Form. <iframe name="hidden_iframe" id="hidden_iframe" style="display:none;" onload="if(submitted){window.location='http:/...yourthankyoupage.htm';}"> </iframe> <form action="https://spreadsheets.google.com/formResponse?formkey=....." method="post" target="hidden_iframe" onsubmit="submitted=true;"> This code is not working. At least not for me. Any

How to post to Google Docs Form directly

我的梦境 提交于 2019-11-26 21:57:43
问题 I'm working on a project where i need to post the data i acquire to a Google form and obtain the data from the spreadsheet. I cannot use google apps script and need a method using the direct POST method as i will be doing this function from a GSM module. All the solutions posted previously take into consideration the old structure of the Google form which provides a form key.Like the solution described in this one: http://www.open-electronics.org/how-send-data-from-arduino-to-google-docs

Send form by email and track responses in spreadsheet

穿精又带淫゛_ 提交于 2019-11-26 18:11:43
问题 I'm using a Google Apps Script to send an email out - I know how to do that. I want to embed a "Yes or No" response link or multiple choice question, and have the recipients' responses recorded in a Google spreadsheet. How do I do that? 回答1: The components involved in this workflow are: A script to generate and send an email with an HTML form. An HTML template for that email, which allows us to customize the email for each recipient. A doPost() function to handle responses. The script must be

Use App Scripts to open form and make a selection

对着背影说爱祢 提交于 2019-11-26 17:45:54
问题 To put this briefly I am testing a Google drive form that will record votes for a school election to ensure that it is secure. Is there a way to open a form from the shared URL and list/input data? In short, can I write a script to act like a bot that will vote and try to crash the form? Sample URL: http://docs.google.com/forms/d/RANDOM_STRING/viewform 回答1: Edit: Some time around the end of 2014 a change in the Google Forms service invalidated this hack. Look at Is it possible to 'prefill' a

Dynamically show / hide form items using Google App Script in Google Form

点点圈 提交于 2019-11-26 17:08:40
问题 I have a questionnaire created using Google form. When the user fill in the answer, some questions should be skipped based on the answer of some previous questions. While I can trust the user that they will follow the instruction, I feel that I can improve it by hiding the questions. I know I can do that by separating the questionnaire into pages and use the default "go to page" function provided by Google form. However, as there are too many questions of this kind, I don't want the user to

How to get form values in the submit event handler?

痞子三分冷 提交于 2019-11-26 16:16:46
问题 I'm trying to get started with a very simple Google Form containing just a couple of questions (a multiple choice with just 2 options and a short text). After creating it, I opened the script editor and typed in function onSubmit(e) { Logger.log("onSubmit(%s)", JSON.stringify(e)); } and configured onSubmit as the handler for "form submit" trigger using the "Current project's triggers" from the "Edit" menu. Filling in the form and submitting it now does result in the handler being called, but

How to prefill Google form checkboxes?

自作多情 提交于 2019-11-26 14:09:29
问题 I have looked at the question "Is it possible to 'prefill' a google form using data from a google spreadsheet?" and the code provided in the answer (thanks Mogsdad) works well for text type Google form questions. My question is: Is it possible to prefill a checkbox type Google form question? For example, if I have an existing spreadsheet with an entry for "Names" and one of the entries is "Fred, Barney" would it be possible, via coding, to have a form prefill with the checkboxes ticked for

How can I be getting multiple unwanted event blocks from the same onFormSubmit Trigger?

ぃ、小莉子 提交于 2019-11-26 10:57:07
I created a one question form this morning because I wanted to look at the event block for myself. However, the process took an unexpected turn for me. My description follows: I'm logging the onFormSubmit event with the following code: function testFormSubmission(e) { var lock=LockService.getUserLock(); try{ if(lock.tryLock(30000)) { var ss=SpreadsheetApp.getActive(); var sh=ss.getSheetByName('LogSheet'); var tA=[Utilities.formatDate(new Date(), Session.getScriptTimeZone(),"d/M/yyyy HH:mm:ss")]; tA=tA.concat(e.values); tA.splice(tA.length-1,1,e.triggerUid,e.range.rowStart,e.range.columnEnd