2022.2

Table Of Contents
"Personalizingcontent"onpage708).Strings,base64-encodedstringsandSVGdata,storedin
datafieldsusingtheDataMappercanbeaddedtothetemplatejustlikeanyothervariabledata;
see"Variabledatainthetext"onpage708.Theywillshowupinthetemplateas they are.
Stringsandbase64-encodedstringsshowupasstrings.
SVGdatawillbeinterpretedanddisplayedasanimage.
Note: TheSignaturedatareturnedbytheCOTGapp(asofAndroid10.6.0,iOS10.6.0,
andWindows6.0)isformattedsothatthesignaturewillautomaticallybescaledtofitinthe
containingboxinatemplate.Withpreviousversionsoftheapptheformatofreturnedsig-
naturescouldvary.
AddingCameradatatothetemplate
TheCamerawidgetsubmitsabase64-encodedstring,whichcanbeputinadatafieldusingthe
DataMapper.Whenthisdatafieldisdraggedintoatemplate,thestringwillshowupinthecontent,
insteadoftheimage.
Tomaketheimageappearinatemplate,thedatahastobeusedastheURLofanimage.
ThebelowproceduredescribeshowtouseCameradataasanimageinsidea<div>container.The
benefitofthisapproachisthattheimageautomaticallyscalestothesizeofthecontainer.
1. ClicktheInsert Inline Boxicononthetoolbar.TheInsert Inline Boxdialogappears.
2. EnteranIDforthebox(anythingwilldo,aslongasithelpsyouidentifythebox)andclickOK.
Theboxisaddedtothetextflowandcanberesizedifneeded.
<p>
Div content goes here
</p>
3. SwitchtotheSourcetabandreplacethecontentofthebox:bythistext:
<img id="camera" src="" width="100%">
4. SwitchbacktotheDesigntab.Youwillseeasmall,emptyrectangleinsideatthetopoftheinline
box.
5. Right-clicktheemptyrectangleandchooseNew Script...inthecontextualmenu.TheEdit
Scriptdialogappears.TheselectorofthescriptisautomaticallysettotheIDoftheselectedele-
ment(#camera).
Alternatively,youcouldaddanewscriptontheScriptspaneandmakesurethattheSelector
fieldissetto#camera.
results.attr("src", record.fields.photo);
Page 521