2022.2

Table Of Contents
Renaming dynamic attachments
Dynamicattachmentscanberenamedviathescriptthatattachesthemtotheemail.Double-clickthe
scripttoopenitandclicktheExpandbutton.
Dynamicattachmentscriptsadda<link>elementtothe<head>ofanEmailsection.Thetitleattribute
ofthatelementspecifiestheattachmentnamethatwillshowupintheemail.
Takealookatthelastlineofthescript:
results.append(query("<linkrel=related>").attr("title", result.split('/').pop()).attr("href",result));
Togivetheattachmentanothername,youhavetoreplacetheboldpartofthecodebythatnewname.
Forexample:
results.append(query("<linkrel=related>").attr("title","Invoice.pdf").attr("href",result));
Ofcourse,youcanalsousedatafieldvalueshere,forexample:results.append(query("<linkrel-
l=related>").attr("title",record.fields.invoice_number + ".pdf").attr("href",result));
NotethattheWizardcannolongerbeusedonceyouhaveeditedandsavedthescript.
Note: Forattachmentnames,itisrecommendedtouseonlyUS-ASCIIcharacters.Otherchar-
actersmaynotbesupportedbyallemailserversandclients.
Web
WiththeDesigneryoucancreateoneormoreWebtemplatesandmergethetemplatewithadataset
togeneratepersonalwebpages.
TheWebcontextistheWeboutputchannelandthefolderintheDesignerthatcancontainoneormore
Webtemplates.CaptureOnTheGotemplatesareWebtemplatesdesignedfortheCaptureOnTheGo
app(see"CaptureOnTheGo"onpage516).TheyarestoredintheWebfolderaswell.
TheWebcontextoutputsoneHTMLwebpage.InadditiontotheHTMLtextitcontainseitherthe
resourcesorreferencestotheresourcesnecessarytodisplayit.
JavaScriptfilesareaddedtothe<head>inthegeneratedHTMLfile.JavaScripttoolboxeslikejQuery
anditsplugins,orMooTools,areusefulwhenyouwanttoimplementspecialfeaturesinthewebpage.
(See"UsingJavaScript"onpage512)
Stylesheetsarealsoaddedtothe<head>andareusedjustastheywouldbeusedinaregularweb
page.(Alsosee:"StylingtemplateswithCSSfiles"onpage672)
Itisadvisabletofollowdesignguidelinesforwebpages,sothattheyarelikelytolookgoodindifferent
browsersandondifferentdevicesandscreensizes.WhenyoustartwithaFoundationorCOTGWeb
TemplateWizard,theFoundationframeworkisaddedtothetemplate,toguaranteejustthat;see
"CreatingaWebtemplatewithaWizard"onthenextpageand"CaptureOnTheGotemplatewizards"
onpage525.
Page 492