title: Google Script trigger on form submit not working
body: <p>I am trying to make the function run using the trigger onFormResponse. However, when I am testing with live form, nothing happens. I have tried deleting, recreating both trigger and the script, but it still does not work. Thank you for your help!</p>
  
  <pre><code>   function onSubmit(e) {
  
    //function get ID of the submitted response, log it to the console
    //run a afunction that ask for permission to get a refilled URL 
    //based on the submitted one
    //email the log to me
  
  
    //get current form
    var currentForm = FormApp.getActiveForm();
  
    // Get ID of form on submited
    var ID = e.response.getId();
    Logger.log(ID);
  
  
    checkPermission(currentResponse);
  
    var recipient = Session.getActiveUser().getEmail();
    var subject = 'Log';
    var body = Logger.getLog();
    MailApp.sendEmail(recipient, subject, body);
    Logger.clear();
  
  }
  function checkPermission(e){
    var ui = FormApp.getUi();
    var dialogBox = ui.alert('Do you want to create a prefill form?',
                             FormApp.getUi().ButtonSet.YES_NO);
  
    if(dialogBox == ui.Botton.YES){
      var link = ui.alert(e.toPrefilledUrl());
    }
  
  }
  
  function triggerTester(){
    // create a an on form submit trigger for function onSubmit
    var currentForm = FormApp.getActiveForm();
    ScriptApp.newTrigger('onSubmit')
       .forForm(currentForm)
       .onFormSubmit().create();
  }
  </code></pre>