我不是程序员,但已将其他脚本复制并粘贴在一起,以便在提交时通过电子邮件发送某些表单。
如果谷歌表单上的一个答案是真的,我想获取一些提交的结果并填写我创建的另一个谷歌表单。这可能吗?谢谢。
这是我拼凑在一起的代码示例,用于在提交时通过电子邮件发送我们表单的结果。
function sendFormByEmail(e) {
var email = "xyxy@yyy.com";
var subject = "Practice Referral Form";
var msgHtml = e.values[5] + "," + "<br/> <br/> <br/>"
+ "Your instructor has referred you to practice the content/skills below. =" + "<br/>"
+ "<h1><b>Referral Information:</b></h1>"
+ "<b>Instructor: </b> " + e.values[1] + "<br/>"
+ "<b>Instructor Email: </b> " + e.values[2] + "<br/>"
+ "<b>Date: </b> " + e.values[0] + "<br/>"
+ "<b>Required Content/Skills: </b> " + e.values[3] + "<br/>"
+ "<b>Skills must be completed by: </b> " + e.values[4] + "<br/>"
+ "<br/> <br/> "
+ "<b>Student Name: </b>" + e.values[5] + "<br/>"
+ "<br/> "
var bccList = e.values[6];
var optAdvancedArgs = {bcc: bccList, noReply: true, htmlBody: msgHtml};
var msgPlain = msgHtml.replace(/\<br\/\>/gi, '\n').replace(/(<([^>]+)>)/ig, ""); // clear html tags and convert br to new lines for plain mail
MailApp.sendEmail(email, subject, msgPlain, optAdvancedArgs);
}