title: How do I add a login to a Google Form for users completing it
body: <p>I have been reading and watching many tutorials online but I could not find something that I can initially load some kind of dialog box or login page with a single input text so then I can process that using apps script.</p>
  
  <p>onFormOpen() is not triggered on the user who completes the form.</p>
  
  <p>On my onSubmitForm() function I have the following code:</p>
  
  <pre><code>function onFormSubmit(e){
    var formResponses = FormApp.getActiveForm().getResponses();
    var formResponse = formResponses[formResponses.length-1];
    var itemResponses = formResponse.getItemResponses();
    for (var j = 0; j &lt; itemResponses.length; j++) {
      var itemResponse = itemResponses[j];
      Logger.log('Last response to the question "%s" was "%s"',
                 itemResponse.getItem().getTitle(),
                 itemResponse.getResponse())
    }
  }
  </code></pre>
  
  <p>Is there any way I can prevent from here the form being submitted with some kind of logic condition, for ex: execute the form submission only if certain field matches some condition?</p>