google-form

e.values in google forms skips empty answers, is there a workaround?

ⅰ亾dé卋堺 提交于 2019-12-17 21:11:12
问题 I have a Google form, which writes response data to a spreadsheet containing a script that is supposed mail the form-filler with his/her answers to the form. I had success with e.values before, and the mail generated just fine. Now there seems to be some problems, as empty answers are skipped, meaning that e.values[9] for example becomes actually column 9, instead of 10, as it used to be (in the spring of 2014, at least). So if there are one or more fields left empty the following answers

Creating form with a script : Page Break and go to page issue

浪子不回头ぞ 提交于 2019-12-17 20:14:58
问题 Before I ask my question, I want to point out that I'm french, so I may have a bad english. If my problem is not understood, I'll try to explain it in better ways. I am currently working on a google script to create a form. In this form I want to ask respondent several multiple choice question. In order to get good and specific results, I want to adapt the questions I ask to the profile of the respondent. To make it clear this is the shape of my form : I start by asking the respondent a first

Getting latest Form Response sometimes gets the one before it instead

 ̄綄美尐妖づ 提交于 2019-12-17 19:51:59
问题 I'm wondering if this has to do with particularly busy times for Google Apps Script, because it seems like it has to do with an (occasional) delay in updating the length of a formResponse[] array. I'm using the following code to get the latest response triggered by a form submit: var form = FormApp.getActiveForm(); var formResponses = form.getResponses(); var formResponse = formResponses[formResponses.length-1]; //latest response only Logger.log('begin length: ' + formResponses.length); Then

Specifying form for 'on form submit' trigger

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 14:56:07
问题 I have two google forms, which send data to two tabs in a single spreadsheet. I have set up a script with two functions. I would like the first function to run on submission of the first form. And, the second function to run on submission of the second form. Problem is: when setting up a trigger onformsubmit, it does not allow you to specify which form. Therefore, whenever completing the first form, it runs both functions. Question: how can I restrict the functions from running only when the

Hidden field in a Google Form

依然范特西╮ 提交于 2019-12-17 07:20:08
问题 I am adding a unique ID to each submission of the form. Right now, I made that ID the first field, and pre-filled it with the ID, along with a help text asking the user not to modify this field. Is there any option by which I can not show this option to the user? 回答1: I assume you're only interested in ways to programmatically assign a unique ID before the user fills out your form. No, Google Forms still has no direct support for hidden fields such as you have in HTML Forms. Your only option

Google Forms file upload complete example

这一生的挚爱 提交于 2019-12-17 02:04:32
问题 How do I allow my viewers to use Google Forms to upload some files to my form and save it to my Google Drive? I am looking for a complete example: It must tell what code to add to the example Google Form HTML source. How to use Google Apps Script to upload the viewer's file to my Google Drive account? 回答1: Update: Google Forms can now upload files. This answer was posted before Google Forms had the capability to upload files. This solution does not use Google Forms. This is an example of

Create Trac ticket from Google Form GAS script?

风格不统一 提交于 2019-12-14 03:56:36
问题 This is a followup question to my original question here. The decision between Bugzilla & Trac seems to have been made for us, and Trac it is. Here are the options I've found so far: Leverage our current Google Form based bug report by modifying the GAS script that is doing our email notification. So far I've been unable to find an example, but it would appear that you can modify the email portion of the GAS script to send email to the Trac server to open a ticket automatically. This is my

Google Forms Rename “File upload” File to “Question - Submitter”

ぃ、小莉子 提交于 2019-12-14 03:13:26
问题 I am using Google Forms to collect images from team members and I want to ensure that each file that is uploaded to Google Forms and saved in Google Drive has the same naming convention. There are five File upload questions that team members are asked to upload their images to. The files are placed into Google Drive folders with random file names followed by - firstName lastName . On an onFormSubmit trigger I would like to change the names of the user-provided files to fileUploadQuestionName

Is it possible to hide certain questions according to respondent's answer?

霸气de小男生 提交于 2019-12-14 02:43:37
问题 For example, if I have the following format: Question 1: (multiple choices) A B Question 2: A1 A2 Question 3: B1 B2 If a respondent chooses A for the first question, then is it possible to hide Question 3 completely to avoid confusion? I understand that I can simply create a new page for different questions but I wish to put everything in one page for simpleness. Is there a script that will help me achieve what I want? Thanks in advance! 回答1: That is not possible. Apps Script can only perform

How to reset Google Form counter values using google apps script

主宰稳场 提交于 2019-12-14 01:55:03
问题 I have several Google forms which are reused frequently with around 300 - 400 form submission each time. Until now, I have two ways to reset form, by hand: Deleting the form while keeping the form editor opened. Select the rows that contain form submissions, right click and choose "Delete ... rows". With script, I've have no luck finding such method like form.reset() . The method .DeleteRows(fromRow, to Row) just delete the rows, but doesn't affect the counters. So, how can I use Google apps