google-forms

Open a URL on Form Submit Event - Google App Script

房东的猫 提交于 2021-02-17 07:00:07
问题 I am using the sample code provided by Serge insas found here: Google Apps Script to open a URL I have modified the code slightly as seen below: Code.GS function modalUrl(){ FormApp.getUi() .showModalDialog( HtmlService.createHtmlOutputFromFile('openUrl').setHeight(50), 'Opening StackOverflow' ) } openURL.html <!DOCTYPE html> <html> <head> <base target="_blank"> <script> var url1 ='https://stackoverflow.com/a/54675103'; var winRef = window.open(url1); winRef ? google.script.host.close() :

How to add a simple calculated field to a google form?

做~自己de王妃 提交于 2021-02-16 09:57:05
问题 I'm looking for a way to add simple calculated field in a google form that will be dependent on other field's values. The first field is a simple price field quantity * price = total_price where quantity is a numeric field entered by the user. The second field is an end date now() + X months where X is selected by the user. I'v taken a look at google's tutorials and found only addons which in my understanding are form wide where i'm looking for something more like a custom form field. The

Can I use scripts alongside or in reference to an Add-on's functions in Google Sheet?

不打扰是莪最后的温柔 提交于 2021-02-15 07:54:58
问题 I've created a Google Sheet in which I am using the Autocrat Add-on. I've created a script that takes further actions that I would like to triggered by onFormSubmit(). What I notice is that if I run the script in the Script Editor, it executes fine and takes the actions on the spreadsheet that I want it to successfully. When I submit a new entry on the form, however, it doesn't run the script - regardless of whether Autocrat is configured to take action onFormSubmit() or not. (This

How to set the go to sections on a Google Forms question using app script

此生再无相见时 提交于 2021-02-11 17:50:42
问题 I have a Google form where some of the fields are "static" content, and some are populated by app script from a Google sheet which will be run on a daily basis. I nearly have it how I want it, but not quite. I have a couple of dropdown lists that need to contain choices that navigate to different sections of the form, e.g: Phill / Beacon Hill - Go to section called "Beacon Hill Jane / Harbord - Go to section called "Harbord" Fred / Beacon Hill - Go to section called "Beacon Hill" etc... What

Google Form AppScript - Item choices disappear when viewing, however it's showing in editing view?

痞子三分冷 提交于 2021-02-11 12:32:25
问题 I created an add-on to import questions & choices as multiple choice items in Forms. The questions, answers & correct answer were imported perfectly and shows as expected in editing view, however when previewing the form/quiz, some questions have choices missing. Any ideas? function createMCQ(k) { var form = FormApp.getActiveForm(); form.setIsQuiz(true) .setShuffleQuestions(true) .setAllowResponseEdits(false) .setLimitOneResponsePerUser(false) .setCollectEmail(true) .setShowLinkToRespondAgain

How to use ARRAYFORMULA to count the nb of word for every row

℡╲_俬逩灬. 提交于 2021-02-10 17:48:05
问题 I'm using google form and after submitting data, I want to count (number of word "OUI" ) for every row. I tried the function: =ArrayFormula(COUNTIF(B$3:D3;"*OUI*")) but it works only for the first row. 回答1: In addition to the solution provided by player0, another way would be to use countif... =ArrayFormula(if(len(A3:A),COUNTIF(if(B3:D="OUI", ROW(A3:A)),ROW(A3:A)),)) 回答2: =ARRAYFORMULA(IF(LEN(A3:A), MMULT(IFERROR(LEN(B3:D)/LEN(B3:D), 0), TRANSPOSE(COLUMN(B3:D3)^0)), )) =ARRAYFORMULA(IF(LEN(A3

How to use ARRAYFORMULA to count the nb of word for every row

蹲街弑〆低调 提交于 2021-02-10 17:47:03
问题 I'm using google form and after submitting data, I want to count (number of word "OUI" ) for every row. I tried the function: =ArrayFormula(COUNTIF(B$3:D3;"*OUI*")) but it works only for the first row. 回答1: In addition to the solution provided by player0, another way would be to use countif... =ArrayFormula(if(len(A3:A),COUNTIF(if(B3:D="OUI", ROW(A3:A)),ROW(A3:A)),)) 回答2: =ARRAYFORMULA(IF(LEN(A3:A), MMULT(IFERROR(LEN(B3:D)/LEN(B3:D), 0), TRANSPOSE(COLUMN(B3:D3)^0)), )) =ARRAYFORMULA(IF(LEN(A3

how to redirect users after completing a embedded google form [duplicate]

只谈情不闲聊 提交于 2021-02-10 08:59:08
问题 This question already has answers here : Old Google Form redirect after submission (3 answers) Closed 6 years ago . I have embedded a google form in one of my pages and it will collect the users : firstname , lastname and email address. but once the user submits the form. They will be redirected to the confirmation page after submitting the form. How do I redirect the completion of the form on 'submit' to another html page? not a php file? Thanks 回答1: Use my this man: Hope it help <script>

how to redirect users after completing a embedded google form [duplicate]

随声附和 提交于 2021-02-10 08:59:07
问题 This question already has answers here : Old Google Form redirect after submission (3 answers) Closed 6 years ago . I have embedded a google form in one of my pages and it will collect the users : firstname , lastname and email address. but once the user submits the form. They will be redirected to the confirmation page after submitting the form. How do I redirect the completion of the form on 'submit' to another html page? not a php file? Thanks 回答1: Use my this man: Hope it help <script>

Can I use Google Apps Script to make a Google Form display randomized text from a Google Sheet?

冷暖自知 提交于 2021-02-10 08:34:29
问题 Say I have a list of 1000 animals in a Google Sheet (e.g., dog, cat, cow, ..., giraffe). I'll like the Google Form to randomly pick one of these animals every time a respondent opens the Form. E.g., Have you ever seen a __________ ? Here, the blank would be different for every respondent (unless they were lucky enough to randomly get matching animals). I currently have the code to randomly select an animal from the Google Sheet, but I can't figure out how to randomly select an animal for each