0

私は学生の労働者であり、Google フォームの操作方法を学んでいます。私が現在関与している部門のフォームを作成しようとしています。カスタムの Google フォームがあり、少しの間機能していましたが、停止しました。http://www.uaf.edu/marketing/intake/にあります。トリガーを onFormSubmit > FromSpreadsheet > onFormSubmit に設定しました。スクリプト エディターでこのコードを使用し、onFormSubmit に設定しています。

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);
    }
4

1 に答える 1