title: Get the current response onSubmit
body: <p>Is there any way to find out the current response of the Google Form (programmatically)?</p>
  
  <p>In the <code>onSubmit</code> function.</p>
  
  <p>Looked over <a href="https://developers.google.com/apps-script/reference/forms/form#getResponse%28String%29" rel="nofollow noreferrer">their documentation</a> but I have to provide the <code>respondId</code>.</p>
  
  <p>How do I find the <code>respondId</code>?</p>
  
  <p>A snipped code from them about this is:</p>
  
  <pre><code>// Open a form by ID and log the responses to each question.
   var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
   var formResponses = form.getResponses();
   for (var i = 0; i &lt; formResponses.length; i++) {
     var formResponse = formResponses[i];
     var itemResponses = formResponse.getItemResponses();
     for (var j = 0; j &lt; itemResponses.length; j++) {
       var itemResponse = itemResponses[j];
       Logger.log('Response #%s to the question "%s" was "%s"',
           (i + 1).toString(),
           itemResponse.getItem().getTitle(),
           itemResponse.getResponse());
     }
   }
  </code></pre>
  
  <p>UPDATE:</p>
  
  <pre><code>function onSubmit(e) {
    /* Get values entered by filling the form */
    var itemResponses = e.response.getItemResponses();
    var myWantedValue = itemResponses[COLUMN_NUMBER].getResponse();
  }
  </code></pre>
  
  <p>Note: <strong>By passing the e(vent) as parameter the values can be accessed by submitting the live form, NOT by the script editor!</strong> </p>