title: Why is my script not creating a new document on form submit?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function autoFillGoogleDocFromForm(e) {
    var formResponse = e.response;
    var itemResponses = formResponse.getItemResponses();
    var test1 = itemResponses[0].getResponse();  
    var test2 = itemResponses[1].getResponse();
  
    
    var templateFile = DriveApp.getFileById("114DNaUycHvCfia13cPf_ht4366s5mVU5eExsEGi9aQE");
    var templateFolder = DriveApp.getFolderById("1zUrELKuybVfG2O6Gw0FkgT1ZET0XkBkw");
  
    var copy = templateFile.makeCopy(test1, templateFolder);
    var doc = DocumentApp.openById(copy.getId());
  
    var body = doc.getBody();
  
    body.replaceText("{{TEST 1}}", test1);
    if(test2 == "None") {
      var string = body.findText("{{TEST 2}}");
      var startOffset = string.getStartOffset();
      var endOffset = string.getEndOffsetInclusive();
      string.getElement().asText().deleteText(startOffset, endOffset);
    }
    else {
      body.replaceText("{{TEST 2}}", test2);
    }
  
    doc.saveAndClose();
  
    
  }</code></pre>
  </div>
  </div>
  </p>
  <p>Hey all I have reached to in here regarding requesting how to create a string to clear a specific field of text if a a google form has been answered in a specific way. However this script is now no longer creating a new doc on form submit. Is there any reasons why this is not working and will the script clear the text if the &quot;none&quot; option is selected?</p>