Search code examples
google-apps-scriptgoogle-forms

Function onOpen not activating when i open my forms


My function onOpen is not activating itself when i reload/open my quetionaire.

function onOpen() {

  this.ClearForm();
  this.UpdateForm();

}

Solution

  • Try this to be sure:

    function onOpen() {
      Logger.log(new Date());
      this.ClearForm();
      this.UpdateForm();
    }
    

    The check logs. If ClearForm or Update form require permission then they can't be run by simple triggers. Try installable trigger instead.

    Simple Trigger Restrictions