Use Google Script to populate a short text item responseHow can I remove the first line of a text file using bash/sed script?Stopping scripters from slamming your websitePopulate a Google Form responses from a Google SpreadsheetCan a Google Form be auto filled and submitted, using data from a spreadsheet?onOpen trigger not being activated on Google FormGoogle Form, make answer field readonlyGoogle Forms using Apps Script to generate responses with personalized headers?How to pre-fill multiple fields in Google forms via a spreadsheet hyperlink code?Possible to populate a Google Form's Questions with a Spreadsheet / CSV?Using a user selected choice from a drop-down to populate a text field in Google Forms
What is the highest achievable score in Catan
Was the Psych theme song written for the show?
Patio gate not at right angle to the house
What force enables us to walk? Friction or normal reaction?
Can machine learning learn a function like finding maximum from a list?
Why did some Apollo missions carry a grenade launcher?
Can a US President, after impeachment and removal, be re-elected or re-appointed?
Just how much information should you share with a former client?
How close to the Sun would you have to be to hear it?
Why are we moving in circles with a tandem kayak?
When encrypting twice with two separate keys, can a single key decrypt both steps?
How can Paypal know my card is being used in another account?
Should I put my name first, or last in the team members list
A basic question on circuits and matrix representation
Solve equation using Mathematica
On the sensitivity conjecture?
Using Python in a Bash Script
How do I make my photos have more impact?
Does Ubuntu reduce battery life?
Is it okay for me to decline a project on ethical grounds?
May a hotel provide accommodation for fewer people than booked?
Why would anyone ever invest in a cash-only etf?
How would a lunar colony attack Earth?
What are the closest international airports in different countries?
Use Google Script to populate a short text item response
How can I remove the first line of a text file using bash/sed script?Stopping scripters from slamming your websitePopulate a Google Form responses from a Google SpreadsheetCan a Google Form be auto filled and submitted, using data from a spreadsheet?onOpen trigger not being activated on Google FormGoogle Form, make answer field readonlyGoogle Forms using Apps Script to generate responses with personalized headers?How to pre-fill multiple fields in Google forms via a spreadsheet hyperlink code?Possible to populate a Google Form's Questions with a Spreadsheet / CSV?Using a user selected choice from a drop-down to populate a text field in Google Forms
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to pre-populate a short-answer-text field on my Google Form. The id of the field is '1542424645'.
This is the script I'm starting with:
function onOpen(e)
// Generate Form Number then add to Form Description
var str1 = Math.round(Math.random()*10000) + '0000';
var str2 = Math.round(Math.random()*10000) + '0000';
var formNumber01 = str1.slice(0,4);
var formNumber02 = str2.slice(0,4);
var formNumber = 'Unique Form # ' + formNumber01 + "-" + formNumber02;
// Identify active form
var form = FormApp.getActiveForm();
// Add Form Number to Form Description
form.setDescription(formNumber);
// entry.1542424645()
I'm able to populate the form description but that information doesn't transfer to a spreadsheet. What I need to do is populate the "Form Number" short-answer-text field (ID='1542424645') with this information.
I DON'T WANT TO USE A SPREADSHEET OR PRE-FILLED URL! I simply need a code snippet in the onOpen() function above to fill in the info. Given the usage of the form, and what its designed to do this is the only option I'm able to use.
Thanks for any help you can provide.
scripting google-form form-fields
add a comment |
I'm trying to pre-populate a short-answer-text field on my Google Form. The id of the field is '1542424645'.
This is the script I'm starting with:
function onOpen(e)
// Generate Form Number then add to Form Description
var str1 = Math.round(Math.random()*10000) + '0000';
var str2 = Math.round(Math.random()*10000) + '0000';
var formNumber01 = str1.slice(0,4);
var formNumber02 = str2.slice(0,4);
var formNumber = 'Unique Form # ' + formNumber01 + "-" + formNumber02;
// Identify active form
var form = FormApp.getActiveForm();
// Add Form Number to Form Description
form.setDescription(formNumber);
// entry.1542424645()
I'm able to populate the form description but that information doesn't transfer to a spreadsheet. What I need to do is populate the "Form Number" short-answer-text field (ID='1542424645') with this information.
I DON'T WANT TO USE A SPREADSHEET OR PRE-FILLED URL! I simply need a code snippet in the onOpen() function above to fill in the info. Given the usage of the form, and what its designed to do this is the only option I'm able to use.
Thanks for any help you can provide.
scripting google-form form-fields
add a comment |
I'm trying to pre-populate a short-answer-text field on my Google Form. The id of the field is '1542424645'.
This is the script I'm starting with:
function onOpen(e)
// Generate Form Number then add to Form Description
var str1 = Math.round(Math.random()*10000) + '0000';
var str2 = Math.round(Math.random()*10000) + '0000';
var formNumber01 = str1.slice(0,4);
var formNumber02 = str2.slice(0,4);
var formNumber = 'Unique Form # ' + formNumber01 + "-" + formNumber02;
// Identify active form
var form = FormApp.getActiveForm();
// Add Form Number to Form Description
form.setDescription(formNumber);
// entry.1542424645()
I'm able to populate the form description but that information doesn't transfer to a spreadsheet. What I need to do is populate the "Form Number" short-answer-text field (ID='1542424645') with this information.
I DON'T WANT TO USE A SPREADSHEET OR PRE-FILLED URL! I simply need a code snippet in the onOpen() function above to fill in the info. Given the usage of the form, and what its designed to do this is the only option I'm able to use.
Thanks for any help you can provide.
scripting google-form form-fields
I'm trying to pre-populate a short-answer-text field on my Google Form. The id of the field is '1542424645'.
This is the script I'm starting with:
function onOpen(e)
// Generate Form Number then add to Form Description
var str1 = Math.round(Math.random()*10000) + '0000';
var str2 = Math.round(Math.random()*10000) + '0000';
var formNumber01 = str1.slice(0,4);
var formNumber02 = str2.slice(0,4);
var formNumber = 'Unique Form # ' + formNumber01 + "-" + formNumber02;
// Identify active form
var form = FormApp.getActiveForm();
// Add Form Number to Form Description
form.setDescription(formNumber);
// entry.1542424645()
I'm able to populate the form description but that information doesn't transfer to a spreadsheet. What I need to do is populate the "Form Number" short-answer-text field (ID='1542424645') with this information.
I DON'T WANT TO USE A SPREADSHEET OR PRE-FILLED URL! I simply need a code snippet in the onOpen() function above to fill in the info. Given the usage of the form, and what its designed to do this is the only option I'm able to use.
Thanks for any help you can provide.
scripting google-form form-fields
scripting google-form form-fields
edited Mar 26 at 23:24
mackycheese21
7081 gold badge4 silver badges18 bronze badges
7081 gold badge4 silver badges18 bronze badges
asked Mar 26 at 21:17
ThomasThomas
12 bronze badges
12 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366325%2fuse-google-script-to-populate-a-short-text-item-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55366325%2fuse-google-script-to-populate-a-short-text-item-response%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown