google-form

onOpen trigger not being activated on Google Form

女生的网名这么多〃 提交于 2019-12-06 07:57:45
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 > Add Trigger menu. The Trigger is listed correctly and seems to be working as opening the form for

Regular Expression for 3 digit without 000

风流意气都作罢 提交于 2019-12-06 07:43:35
I want to write a regular expression on Google Form First Character between 1 to 9 Second and Third any alphabets (Upper Case) and next 3 characters should be number like 541 or 001 but not 000 This expression is also taking 000 [1-9][A-Z]{2}[0-9]{3} Use alternations: [1-9][A-Z]{2}([1-9][0-9][0-9]|[0-9][1-9][0-9]|[0-9][0-9][1-9]) See regex demo Here, [1-9] - matches 1 digit from 1 to 9 [A-Z]{2} - two uppercase ASCII letters ([1-9][0-9][0-9]|[0-9][1-9][0-9]|[0-9][0-9][1-9]) - 3 alternatives: [1-9][0-9][0-9] - 3-digit numbers starting with 1 [0-9][1-9][0-9] - 3-digit numbers having 1 in the

Is it possible to populate a google form from a google spreadsheet?

寵の児 提交于 2019-12-06 06:37:05
问题 I'd like to create a form that uses the data from the spreadsheet, so that it's dynamic. Is it possible to do this? I haven't been able to find anywhere that describes how, or any examples. All that seems possible is to populate a spreadsheet from a form, which I'll also use but its not the primary concern here. 回答1: Google Apps Scripts.. finally a well documented way of generating Google forms programmatically. https://developers.google.com/apps-script/reference/forms/ 回答2: Yes it is. Use a

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

蹲街弑〆低调 提交于 2019-12-06 04:14:07
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://docs.google.com/a/bay.k12.fl.us/spreadsheets /d/1ZTDQL9G5U7RqbbKQbAfb3ERqFwpSsC3EOQxdD1zdQwA/edit#gid

Google Form output to remote MySQL database

狂风中的少年 提交于 2019-12-06 03:06:28
问题 I have a Google Form I created. I have a website with a remote MySQL database. I would like to embed the Google Form into my site (this I've figured out), however instead of the data from form submission being stored in a Google Spreadsheet(s), I'd like the data to be sent to my MySQL database, to a predefined table designed to accept the data types being collected and validated for in the Google Form. I have researched and come across Google Apps Scripts (https://developers.google.com/apps

Google Apps Script for Form, Generate Unique ID Number

白昼怎懂夜的黑 提交于 2019-12-05 21:30:18
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 using other info I've found. It seems to work for everything except the e-mail response going back to

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

谁说胖子不能爱 提交于 2019-12-05 20:03:44
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']) .showOtherOption(true); form.addPageBreakItem() .setTitle('Getting to know you'); form.addDateItem() .setTitle(

Google Forms Timer

倖福魔咒の 提交于 2019-12-05 15:19:29
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 :) Kleigh A Previous Question has mentioned this before. Right now you are correct, you cannot time a quiz using a script at

How to add a timer to Google Forms for a School Quiz?

﹥>﹥吖頭↗ 提交于 2019-12-05 11:58:35
I'm helping a school teacher and we have an English Language Test made using Google Forms which is split into 3 sections. We would like to be able to set a time on each section (e.g. Section A = 10 min, Section B = 10 min Section C = 40 min). We would like the student to be able to see the countdown on each section they're doing, Is this at all possible? I'm a Novice with Google Apps Script and I've seen JS code for timers but I don't know how to piece them together in the Google Form. Nothing like that available at the present time in Google Forms. You might like to wait a couple of weeks

How to Customize & Validate Google Docs Form (an easier way?)

随声附和 提交于 2019-12-05 08:13:30
问题 I've been searching for a way to customize and validate a Google Form, and finally my demo page is online and perfectly working! I've also created a step-by-step tutorial on how to customize and validate. But all this process took lot of time searching for solutions and snippets of code on google / stackoverflow. So my question: Is there an easier way or a better coded way to do this? Can the code in my answer be applied to better form templates? I've read this ::post:: on stackoverflow,