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;








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.










share|improve this question
































    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.










    share|improve this question




























      0












      0








      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.










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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

























          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
          );



          );













          draft saved

          draft discarded


















          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.



















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현