我尝试使用应用脚本在电子邮件中嵌入表单。我在Send form by email and track responses in spreadsheet的底部遇到了一个有趣的想法:
在开发ui和管理响应方面做一些工作的简单方法是创建一个使用Google Apps基础架构,通过电子邮件发送自己的表单并点击show original。
然后您可以使用嵌入式代码并使用您的脚本发送邮件,响应将自动记录在与表单关联的电子表格中。
基于此,我创建了一个文件' t1.html'如截图
我有:
var html = HtmlService
.createTemplateFromFile('t1')
.evaluate();
MailApp.sendEmail('me@gmail.com', "Activity Form: ",html);
当我运行它时,我得到以下内容:
Malformed HTML content: <html><body style=3D"font-family: Roboto,Helvetica,Arial,sans-serif; margin
我做错了什么?
编辑:
我收到了同样的错误但是在文件的末尾。 body和html标签底部是红色,顶部是绿色。
EDIT2:
我想,我修正了 - 但同样的错误,底部的标签仍然是红色的?
编辑3 - 整个表格:
<html><body style=3D"font-family: Roboto,Helvetica,Arial,sans-serif; margin=
: 0; padding: 0; height: 100%; width: 100%;"><table border=3D"0" cellpaddin=
g=3D"0" cellspacing=3D"0" style=3D"background-color:rgb(61, 143, 45);" widt=
h=3D"100%" role=3D"presentation"><tbody><tr height=3D"64px"><td style=3D"pa=
dding-left: 24px"><img alt=3D"Google Forms" height=3D"26px" style=3D"displa=
y: inline-block; margin: 0; vertical-align: middle;" width=3D"143px" src=3D=
"https://www.gstatic.com/docs/forms/google_forms_logo_lockup_white_2x.png">=
</td></tr></tbody></table><div style=3D"padding: 24px; background-color:rgb=
(205, 231, 199)"><table align=3D"center" border=3D"0" cellpadding=3D"0" cel=
lspacing=3D"0" style=3D"max-width: 672px; min-width: 154px;" width=3D"100%"=
role=3D"presentation"><tbody><tr><td style=3D"font-size: 13px; line-height=
: 18px; color: #424242; font-weight: 700">Having trouble viewing or submitt=
ing this form?</td></tr><tr height=3D"8px"><td></td></tr><tr><td><table bor=
der=3D"0" cellpadding=3D"0" cellspacing=3D"0" width=3D"100%"><tbody><tr><td=
><a href=3D"https://docs.google.com/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97s=
XZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c=3D0&w=3D1&usp=3Dmail_form_li=
nk" style=3D"border-radius: 3px; box-sizing: border-box; display: inline-bl=
ock; font-size: 13px; font-weight: 700; height: 40px; line-height: 40px; pa=
dding: 0 24px; text-align: center; text-decoration: none; text-transform: u=
ppercase; vertical-align: middle; color: #fff; background-color: rgb(61, 14=
3, 45);" target=3D"_blank" rel=3D"noopener">FILL OUT IN GOOGLE FORMS</a></t=
d></tr></tbody></table></td></tr><tr height=3D"24px"><td></td></tr></tbody>=
</table><div align=3D"center" style=3D"background-color: #fff; border-botto=
m: 1px solid #e0e0e0; margin: 0 auto; max-width: 624px; min-width: 154px; p=
adding: 0 24px;"><table align=3D"center" cellpadding=3D"0" cellspacing=3D"0=
" style=3D"background-color: #fff;" width=3D"100%" role=3D"presentation"><t=
body><tr height=3D"24px"><td></td></tr><tr><td><span style=3D"display: tabl=
e-cell; vertical-align: top; font-size: 13px; line-height: 18px; color: #42=
4242;">I've invited you to fill out a form:</span></td></tr><tr height=
=3D"20px"><td></tr><tr style=3D"font-size: 20px; line-height: 24px;"><td><s=
pan style=3D"display: table-cell;"><a href=3D"https://docs.google.com/forms=
/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c=3D=
0&w=3D1&usp=3Dmail_form_link" style=3D"color: rgb(61, 143, 45); tex=
t-decoration: none; vertical-align: middle; font-weight: 500">Document Info=
rmation</a><div itemprop=3D"action" itemscope itemtype=3D"http://schema.org=
/ViewAction"><meta itemprop=3D"url" content=3D"https://docs.google.com/form=
s/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c=
=3D0&w=3D1&usp=3Dmail_goto_form"><meta itemprop=3D"name" content=3D=
"Fill out form"></div></span></td></tr><tr height=3D"16px"></tr><tr><td><sp=
an style=3D"display: table-cell; vertical-align: top; font-size: 13px; line=
-height: 18px; color: #424242;">This info will be used on our documents</sp=
an></td></tr><tr height=3D"24px"></tr><tr><td><div class=3D"ss-form" style=
=3D""><form action=3D"https://docs.google.com/forms/u/0/d/e/1FAIpQLSfj58g-8=
7jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/formResponse" method=3D"POST" id=
=3D"ss-form" target=3D"_self" onsubmit=3D"" style=3D""><ol role=3D"list" cl=
ass=3D"ss-question-list" style=3D"padding-left: 0;list-style-type:none;">
<div class=3D"ss-form-question errorbox-good" role=3D"listitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_2005620554" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Owner's First Name
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.2005620554" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_2005620554" dir=3D"auto" aria-label=3D"Owner's First Na=
me " aria-required=3D"true" title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_2126206062" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Owner's Last Name
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.2126206062" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_2126206062" dir=3D"auto" aria-label=3D"Owner's Last Nam=
e " aria-required=3D"true" title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_1045781291" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Owner's Street Address
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.1045781291" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_1045781291" dir=3D"auto" aria-label=3D"Owner's Street A=
ddress " aria-required=3D"true" title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_2093621735" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Owner's Town/City
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.2093621735" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_2093621735" dir=3D"auto" aria-label=3D"Owner's Town/Cit=
y " aria-required=3D"true" title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_1159980352" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Owner's State
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.1159980352" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_1159980352" dir=3D"auto" aria-label=3D"Owner's State "=
aria-required=3D"true" title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-item-required ss-text" style=3D"margi=
n:12px 0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertic=
al-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_97849368" style=3D""><div cla=
ss=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83em;=
margin-bottom:.83em;">Owner's Zip=20
<label for=3D"itemView.getDomIdToLabel()" aria-label=3D"(Required field)" s=
tyle=3D""></label>
<span class=3D"ss-required-asterisk" aria-hidden=3D"true" style=3D"color:#c=
43b1d;">*</span></div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"number" name=3D"entry.97849368" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_97849368" dir=3D"auto" aria-label=3D"Owner's Zip Must=
be a number" aria-required=3D"true" title=3D"Must be a number" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-paragraph-text" style=3D"margin:12px=
0;"><div class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertical-ali=
gn:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_1065046570" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Property Legal Description
</div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<textarea name=3D"entry.1065046570" rows=3D"8" cols=3D"0" class=3D"ss-q-lon=
g" id=3D"entry_1065046570" dir=3D"auto" aria-label=3D"Property Legal Descri=
ption " style=3D"resize:vertical;width:70%;"></textarea>
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-text" style=3D"margin:12px 0;"><div =
class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertical-align:middle;=
margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_205266861" style=3D""><div cl=
ass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83em=
;margin-bottom:.83em;">Property Account Number
</div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.205266861" value=3D"" class=3D"ss-q-shor=
t" id=3D"entry_205266861" dir=3D"auto" aria-label=3D"Property Account Numbe=
r " title=3D"" style=3D"">
</div></div></div> <div class=3D"ss-form-question errorbox-good" role=3D"li=
stitem" style=3D"">
<div dir=3D"auto" class=3D"ss-item ss-text" style=3D"margin:12px 0;"><div =
class=3D"ss-form-entry" style=3D"margin-bottom:1.5em;vertical-align:middle;=
margin-left:0;margin-top:0;max-width:100%;">
<label class=3D"ss-q-item-label" for=3D"entry_1714605862" style=3D""><div c=
lass=3D"ss-q-title" style=3D"display:block;font-weight:bold;margin-top:.83e=
m;margin-bottom:.83em;">Property Address
</div>
<div class=3D"ss-q-help ss-secondary-text" dir=3D"auto" style=3D"display:bl=
ock;margin:.1em 0 .25em 0;color:#666;"></div></label>
<input type=3D"text" name=3D"entry.1714605862" value=3D"" class=3D"ss-q-sho=
rt" id=3D"entry_1714605862" dir=3D"auto" aria-label=3D"Property Address " =
title=3D"" style=3D"">
</div></div></div>
<input type=3D"hidden" name=3D"draftResponse" value=3D"[null,null,"883=
0551375159526782"]
" style=3D"">
<input type=3D"hidden" name=3D"pageHistory" value=3D"0" style=3D"">
<input type=3D"hidden" name=3D"usp" value=3D"mail_form_submit" style=3D"">
<input type=3D"hidden" name=3D"fbzx" value=3D"8830551375159526782" style=3D=
"">
<div class=3D"ss-item ss-navigate" style=3D"margin:12px 0;"><table id=3D"na=
vigation-table" style=3D""><tbody><tr><td class=3D"ss-form-entry goog-inlin=
e-block" id=3D"navigation-buttons" dir=3D"ltr" style=3D"margin-bottom:1.5em=
;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;position:r=
elative;display:inline-block;">
<input type=3D"submit" name=3D"submit" value=3D"Submit" id=3D"ss-submit" cl=
ass=3D"jfk-button jfk-button-action " style=3D"">
<div class=3D"ss-password-warning ss-secondary-text" style=3D"color:#666;">=
Never submit passwords through Google Forms.</div></td>
</tr></tbody></table></div></ol></form></div>
<div class=3D"ss-footer" style=3D""><div class=3D"ss-attribution" style=3D"=
"></div>
<div class=3D"ss-legal" style=3D""><div class=3D"disclaimer-separator" styl=
e=3D""></div>
<div class=3D"disclaimer" dir=3D"ltr" style=3D""><div class=3D"powered-by-l=
ogo" style=3D"margin-top:2em;"><span class=3D"powered-by-text" style=3D"">P=
owered by</span>
<a href=3D"https://www.google.com/forms/about/?utm_source=3Dproduct&utm=
_medium=3Dforms_logo&utm_campaign=3Dforms" style=3D""><div class=3D"ss-=
logo-container" style=3D""><img src=3D"https://ssl.gstatic.com/docs/forms/f=
orms_logo_2_small_dark_2x.png" height=3D"21px" width=3D"108px" alt=3D"Googl=
e Forms" style=3D""></div></a></div>
<div class=3D"ss-terms" style=3D"color:#777;font-size:11px;margin-top:1.5em=
;"><span class=3D"disclaimer-msg" style=3D"">This content is neither create=
d nor endorsed by Google.</span>
<br>
<a href=3D"https://docs.google.com/forms/u/0/d/e/1FAIpQLSfj58g-87jOhRZfaFjK=
97sXZJs91v6ArzwBiwf060x0IDH-SQ/reportabuse?source=3Dhttps://docs.google.com=
/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewfor=
m?sid%3D2b7fc9792dfd5e0b%26c%3D0%26w%3D1%26token%3DI_Y1xl4BAAA.glSNAM2muxH-=
ZfYW-H1nuw.UAuDr1pX_XDohsgv8ZiNdg" style=3D"">Report Abuse</a>
-
<a href=3D"http://www.google.com/accounts/TOS" style=3D"">Terms of Service<=
/a>
-
<a href=3D"http://www.google.com/google-d-s/terms.html" style=3D"">Addition=
al Terms</a></div></div></div></div>
</td></tr><tr height=3D"24px"></tr></tbody></table></div><table align=3D"ce=
nter" cellpadding=3D"0" cellspacing=3D"0" style=3D"max-width: 672px; min-wi=
dth: 154px;" width=3D"100%" role=3D"presentation"><tbody><tr height=3D"24px=
"><td></td></tr><tr><td><a href=3D"https://docs.google.com/forms?usp=3Dmail=
_form_link" style=3D"color: #616161; font-size: 13px;">Create your own Goog=
le Form</a></td></tr></tbody></table></div></body></html>
答案 0 :(得分:1)
格式化但是在mutch解析错误的某个时候脚本添加/ n或/ r with = before和更多3D ...
<html>
<body style="font-family: Roboto,Helvetica,Arial,sans-serif; margin: 0; padding: 0; height: 100%; width: 100%;">
<table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(61, 143, 45);" width="100%" role="presentation">
<tbody>
<tr height="64px">
<td style="padding-left: 24px">
<img alt="Google Forms" height="26px" style="display: inline-block; margin: 0; vertical-align: middle;" width="143px" src="https://www.gstatic.com/docs/forms/google_forms_logo_lockup_white_2x.png">
</td>
</tr>
</tbody>
</table>
<div style="padding: 24px; background-color:rgb(205, 231, 199)">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="max-width: 672px; min-width: 154px;" width="100%" role="presentation">
<tbody>
<tr>
<td style="font-size: 13px; line-height: 18px; color: #424242; font-weight: 700">
Having trouble viewing or submitting this form?
</td>
</tr>
<tr height="8px">
<td></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c=0&w=1&usp=mail_form_link" style="border-radius: 3px; box-sizing: border-box; display: inline-block; font-size: 13px; font-weight: 700; height: 40px; line-height: 40px; padding: 0 24px; text-align: center; text-decoration: none; text-transform: uppercase; vertical-align: middle; color: #fff; background-color: rgb(61, 143, 45);" target="_blank" rel="noopener">
FILL OUT IN GOOGLE FORMS
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr height="24px">
<td></td>
</tr>
</tbody>
=
</table>
<div align="center" style="background-color: #fff; border-bottom: 1px solid #e0e0e0; margin: 0 auto; max-width: 624px; min-width: 154px; padding: 0 24px;">
<table align="center" cellpadding="0" cellspacing="0" style="background-color: #fff;" width="100%" role="presentation">
<tbody>
<tr height="24px">
<td></td>
</tr>
<tr>
<td>
<span style="display: table-cell; vertical-align: top; font-size: 13px; line-height: 18px; color: #424242;">
I've invited you to fill out a form:
</span>
</td>
</tr>
<tr height="20px">
<td></td>
</tr>
<tr style="font-size: 20px; line-height: 24px;">
<td>
<span style="display: table-cell;">
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c==
0&w=1&usp=mail_form_link" style="color: rgb(61, 143, 45); text-decoration: none; vertical-align: middle; font-weight: 500">
Document Information
</a>
<div itemprop="action" itemscope itemtype="http://schema.org=
/ViewAction">
<meta itemprop="url" content="https://docs.google.com/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?c=
=0&w=1&usp=mail_goto_form">
<meta itemprop="name" content="Fill out form">
</div>
</span>
</td>
</tr>
<tr height="16px"></tr>
<tr>
<td>
<span style="display: table-cell; vertical-align: top; font-size: 13px; line-height: 18px; color: #424242;">
This info will be used on our documents
</span>
</td>
</tr>
<tr height="24px"></tr>
<tr>
<td>
<div class="ss-form" style="">
<form action="https://docs.google.com/forms/u/0/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/formResponse" method="POST" id="ss-form" target="_self" onsubmit="" style="">
<ol role="list" class="ss-question-list" style="padding-left: 0;list-style-type:none;">
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_2005620554" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">
Owner's First Name
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span>
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.2005620554" value="" class="ss-q-short" id="entry_2005620554" dir="auto" aria-label="Owner's First Name " aria-required="true" title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_2126206062" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">
Owner's Last Name
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span>
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.2126206062" value="" class="ss-q-short" id="entry_2126206062" dir="auto" aria-label="Owner's Last Name " aria-required="true" title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_1045781291" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">Owner's Street Address
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span>
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.1045781291" value="" class="ss-q-short" id="entry_1045781291" dir="auto" aria-label="Owner's Street Address " aria-required="true" title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_2093621735" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">
Owner's Town/City
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span>
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.2093621735" value="" class="ss-q-short" id="entry_2093621735" dir="auto" aria-label="Owner's Town/Cit=
y " aria-required="true" title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_1159980352" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">
Owner's State
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span></div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.1159980352" value="" class="ss-q-short" id="entry_1159980352" dir="auto" aria-label="Owner's State"aria-required="true" title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-item-required ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_97849368" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">
Owner's Zip=20
<label for="itemView.getDomIdToLabel()" aria-label="(Required field)" style=""></label>
<span class="ss-required-asterisk" aria-hidden="true" style="color:#c43b1d;">*</span>
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="number" name="entry.97849368" value="" class="ss-q-short" id="entry_97849368" dir="auto" aria-label="Owner's Zip Must=
be a number" aria-required="true" title="Must be a number" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-paragraph-text" style="margin:12px=
0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_1065046570" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">Property Legal Description
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<textarea name="entry.1065046570" rows="8" cols="0" class="ss-q-long" id="entry_1065046570" dir="auto" aria-label="Property Legal Description " style="resize:vertical;width:70%;"></textarea>
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_205266861" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">Property Account Number
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.205266861" value="" class="ss-q-short" id="entry_205266861" dir="auto" aria-label="Property Account Number " title="" style="">
</div>
</div>
</div>
<div class="ss-form-question errorbox-good" role="listitem" style="">
<div dir="auto" class="ss-item ss-text" style="margin:12px 0;">
<div class="ss-form-entry" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;">
<label class="ss-q-item-label" for="entry_1714605862" style="">
<div class="ss-q-title" style="display:block;font-weight:bold;margin-top:.83em;margin-bottom:.83em;">Property Address
</div>
<div class="ss-q-help ss-secondary-text" dir="auto" style="display:block;margin:.1em 0 .25em 0;color:#666;"></div>
</label>
<input type="text" name="entry.1714605862" value="" class="ss-q-short" id="entry_1714605862" dir="auto" aria-label="Property Address " title="" style="">
</div>
</div>
</div>
<input type="hidden" name="draftResponse" value="[null,null,"8830551375159526782"]" style="">
<input type="hidden" name="pageHistory" value="0" style="">
<input type="hidden" name="usp" value="mail_form_submit" style="">
<input type="hidden" name="fbzx" value="8830551375159526782" style="">
<div class="ss-item ss-navigate" style="margin:12px 0;">
<table id="navigation-table" style="">
<tbody>
<tr>
<td class="ss-form-entry goog-inline-block" id="navigation-buttons" dir="ltr" style="margin-bottom:1.5em;vertical-align:middle;margin-left:0;margin-top:0;max-width:100%;position:relative;display:inline-block;">
<input type="submit" name="submit" value="Submit" id="ss-submit" class="jfk-button jfk-button-action " style="">
<div class="ss-password-warning ss-secondary-text" style="color:#666;">
Never submit passwords through Google Forms.
</div>
</td>
</tr>
</tbody>
</table>
</div>
</ol>
</form>
</div>
<div class="ss-footer" style="">
<div class="ss-attribution" style=""></div>
<div class="ss-legal" style="">
<div class="disclaimer-separator" style=""></div>
<div class="disclaimer" dir="ltr" style="">
<div class="powered-by-logo" style="margin-top:2em;">
<span class="powered-by-text" style="">Powered by</span>
<a href="https://www.google.com/forms/about/?utm_source=product&utm_medium=forms_logo&utm_campaign=forms" style="">
<div class="ss-logo-container" style=""><img src="https://ssl.gstatic.com/docs/forms/forms_logo_2_small_dark_2x.png" height="21px" width="108px" alt="Google Forms" style=""></div>
</a>
</div>
<div class="ss-terms" style="color:#777;font-size:11px;margin-top:1.5em;"><span class="disclaimer-msg" style="">
This content is neither created nor endorsed by Google.</span>
<br>
<a href="https://docs.google.com/forms/u/0/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/reportabuse?source=https://docs.google.com/forms/d/e/1FAIpQLSfj58g-87jOhRZfaFjK97sXZJs91v6ArzwBiwf060x0IDH-SQ/viewform?sid%2b7fc9792dfd5e0b%26c%0%26w%1%26token%I_Y1xl4BAAA.glSNAM2muxH-ZfYW-H1nuw.UAuDr1pX_XDohsgv8ZiNdg" style="">Report Abuse</a>
<a href="http://www.google.com/accounts/TOS" style="">Terms of Service</a>
<a href="http://www.google.com/google-d-s/terms.html" style="">Additional Terms</a>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr height="24px"></tr>
</tbody>
</table>
</div>
<table align="center" cellpadding="0" cellspacing="0" style="max-width: 672px; min-width: 154px;" width="100%" role="presentation">
<tbody>
<tr height="24px">
<td></td>
</tr>
<tr>
<td><a href="https://docs.google.com/forms?usp=mailform_link" style="color: #616161; font-size: 13px;">Create your own Google Form</a>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
答案 1 :(得分:0)
只是为了完成这个问题,上面的模板是正确的并链接到工作表。我将代码更改为:
function buildFollowUpForm() {
var html = doGet();
MailApp.sendEmail({
to: 'me@gmail.com',
subject: 'hi',
htmlBody: html
});
}
function doGet() {
var template = HtmlService.createTemplateFromFile('t1');
var app = template.evaluate().getContent();
return app;
}