google-form

Google forms script on form submit - event does not have FormResponse object

血红的双手。 提交于 2019-12-08 04:55:25
问题 I have a google form, and have added a script to it. I created a function: function myFunction(e) { Logger.log(e); } Then I went to Edit > Current Project Triggers I added a new trigger, selecting myFunction, and the following settings: Select Event Source = From Form Select Event Type = On form submit When I submit the form and check the logs, I see: {authMode=FULL, source=Form, triggerUid=25580} It does not have a response object I have a number of other forms set up and are working and

Google Form on Submit, Send Email Lock Doesn't Work

自作多情 提交于 2019-12-08 02:16:52
问题 I have created a google form with an email field. Responses are stored in a spreadsheet. On submit I take the last row from the sheet (latest response) and send an email to that user. I have tried to implement a lock system, however it does not work the way I would like it too. If a there are multiple submissions in quick succession (i.e 3 within a minute) only the last user will get an email sent to them, they will in fact get 3 duplicate emails the number submitted in quick succession.

Release grade immediately after submission - how to do using Apps Script

夙愿已清 提交于 2019-12-08 02:13:15
问题 I am using the following lines of Apps Script to dynamically generate a Google Forms Quiz form.setIsQuiz(true); form.setTitle("New") .setDescription('Test') .setConfirmationMessage('Thanks for responding!') .setAllowResponseEdits(false) .setAcceptingResponses(true) .setLimitOneResponsePerUser(true) .setShuffleQuestions(true) .setProgressBar(true) .setCollectEmail(true) This is creating a form and i am able to send out the quizzes to multiple people. But i also want to "Release Score >>

onOpen trigger not being activated on Google Form

六眼飞鱼酱① 提交于 2019-12-08 00:53:09
问题 The onOpen event on my Google Form is being activated only when I open the form for edition, but not when I open it to answer (/viewform). Actually, I just want it to run when someone opens the form to answer, because my script updates a combobox with current information from a table. I'm not sure if that is the best way to do it, but I'm open to suggestions. I tried both creating a function onOpen() and also creating a doIt() function and manually adding a trigger to onOpen on the Resources

Issue with setting form response destination (possibly an issue with getID() function)

元气小坏坏 提交于 2019-12-08 00:29:23
问题 NOTE: This issue has been brought to the attention of google dev's and they are apparently looking into solving this. There is no solution yet, please see here if this issue affects you too! I have been working with a small project for a while in google script, I ran my script and received the "Failed to set response destination. Verify the destination ID and try again." error. This occured in a section of my code where various forms are generated each with a corresponding response

Google App Script Error: You do not have permission to call getActiveForm?

廉价感情. 提交于 2019-12-07 15:20:32
问题 I am creating a script that takes information from a form and writes it to a calendar. When I run the script in the script editor it works great, takes information from the spreadsheet and creates a calendar event. However, when I fill out the forma and submit ( submit is the trigger) I get a error stating I do not have permission to call getActiveForm(). I own both form and calendar. I appreciate any ideas. Code function createEvent() { var calendarToUse = "testing"; var ssUrlToUse ='https:/

Generate own HTML for Google Form

和自甴很熟 提交于 2019-12-07 14:48:02
问题 I like to generate the Google Form using my own template engine. Unfortunatelly in the basic theme you can change only the background image, fonts, color etc is allowed. I like to have a nice HTML page in "bootstrap" style. So far I can see I could do this using Google Script. The script should open the form and generate HTML template (like example below). Does someone know how to generate correctly this form? Which url to submit should I use? Hidden parameters? Thanks for any comments. Code

How to run Google App Script function from Google OAuth 2.0 Playground | The caller does not have permission

假如想象 提交于 2019-12-07 13:08:22
问题 I have created a new script which creates "Google Form" on my google account. Following is the sample code: function myFunction() { var form = FormApp.create('New Form'); var item = form.addCheckboxItem(); item.setTitle('What condiments would you like on your hot dog?'); item.setChoices([ item.createChoice('Ketchup'), item.createChoice('Mustard'), item.createChoice('Relish') ]); form.addMultipleChoiceItem() .setTitle('Do you prefer cats or dogs?') .setChoiceValues(['Cats','Dogs'])

Google Apps Script for Form, Generate Unique ID Number

為{幸葍}努か 提交于 2019-12-07 11:55:17
问题 I created a simple Google form with the fields: Name, E-mail, Salary and Request. When the user completes the form, I want to send him/her an e-mail with the info. However, I want to use the "Request" field to plug in a unique number that the user can refer to if they need further correspondence. If the user enters anything in the 'Request' field, I want to discard it and use the number that I generate (both in the response and in the spreadsheet). I've been able to piece together the script

Google Forms Timer

空扰寡人 提交于 2019-12-07 11:19:35
问题 I am looking to create a timer on a quiz that I am creating in Google Forms. I have found this post here - How to add a timer to Google Forms for a School Quiz? - from 2013 where it's mentioned that scripting might make this possible eventually. I am wondering if anyone has figured this out or has a solution. Ideally I would like to have the timer start when someone opens the form and auto submit or stop receiving submissions after a set elapsed time. Thanks in advance :) 回答1: A Previous