我是一名學生工作人員,我正在學習如何使用Google表單。我正在嘗試爲我目前涉及的部門構建一個表單。我有一個自定義的Google表單,它工作了一段時間,然後停止了。它位於http://www.uaf.edu/marketing/intake/。我有觸發器設置爲onFormSubmit> FromSpreadsheet> onFormSubmit。我在腳本編輯器中使用此代碼並設置onFormSubmit:Google表單停止工作
function onFormSubmit(e) {
var name = e.values[1];
var title = e.values[2];
var department = e.values[3];
var email = e.values[4];
var phone = e.values[5];
var newproject = e.values[6];
var project = e.values[7];
var description = e.values[8];
var descriptcomment = e.values[9];
var audience = e.values[10];
var audiencecomment = e.values[11];
var accomplish = e.values[12];
var result = e.values[13];
var tarday = e.values[14];
var compday = e.values[15];
var infoday = e.values[16];
var chat = e.values[17];
var refer = e.values[18];
// change this address to be the address where you want the notification to go
var to = "email#1,email#2";
var subject = "MC Intake Form Notification";
var message = "Your Name: " + name + "\n \n";
message += "Your title: " + title + "\n \n";
message += "Department: " + department + "\n \n";
message += "Email: " + email + "\n \n";
message += "Phone number: " + phone + "\n \n";
message += "Is this a new project: " + newproject + "\n \n";
message += "Project title: " + project + "\n \n";
message += "Project description: " + description + "\n \n";
message += "Project description comments: " + descriptcomment + "\n \n";
message += "Who's your audience? " + audience + "\n \n";
message += "Audience comments " + audiencecomment + "\n \n";
message += "What are you trying to accomplish? " + accomplish + "\n \n";
message += "What is the desired result, and what will success look like? " + result + "\n \n";
message += "What is your targeted start date? " + tarday + "\n \n";
message += "What is your targeted completion date? " + compday + "\n \n";
message += "Information about distrbution target dates, what date an event is happening, when you can provide content,etc. " + infoday + "\n \n";
message += "Are you currently working with anyone in our department? " + chat + "\n \n";
message += "How were you referred to this form? " + refer + "\n \n";
var mailOptions = {
name: name,
replyTo: email,
};
MailApp.sendEmail(to, subject, message, mailOptions);
}
這個問題似乎是無關緊要的,因爲它是關於臨時服務中斷,無需用戶干預而自行清除。其他人不太可能從中吸取教訓。 – Mogsdad