2022.2

Table Of Contents
6. Enterthefollowingscriptcode:Thenameofthedatafield(inthiscase:photo)mustbethatofthe
Cameradatainyourdatamodel.
Thisscriptupdatestheattribute“src”withthefieldcontainingthebase64image.
7. ClickOKtosavethescriptandtoggletothePreviewmodetoseetheresult.Youshouldsee
yourimage.Whenyouresizetheinlineboxthatsurroundstheimage,theimageshouldberes-
izedaswell.
Iftheinlineboxisn'tvisible,clicktheShowEdges buttoninthetoolbar.
Designing a COTG Template
DesigningaCaptureOnTheGotemplateismorethanaddingelementstoaWebform.Thistopic
sharessomeinsightsregardingthedesignprocessandprinciples.
Designprocess
Ideally,thedesignprocessconsistsofthefollowingsteps.
1. Gathering information.Itisoftentemptingtoskipthisstep,especiallywhenaCapture
OnTheGoformreplacesapaperform,buttheresearchthatyoudotofindoutwhatthecompany
actuallyneedswillprovetobewellworthyourtime.Creatingspecificationsupfrontpreventsdis-
cussions,reducesreworkandthereforesavestime.
2. Listing the input fieldsthatareneeded,theirtype,andpossibleinputconstraints.Thinkofhow
theinformationshouldbevisuallygrouped.Togetanoverviewofalltheelementsandfeatures
thatcanbeusedinaCaptureOnTheGoform,checkoutthefollowingpages:
l
"COTGElements"onpage633,aboutelementsthatwerespeciallydesignedforCOTG.
l
"FormElements"onpage644,aboutelementsthatcanbeusedonCOTGformsandon
anyotherWebform.
l
"UsingFoundation"onpage528,aboutelementsandfeaturesthatcomewiththeFound-
ationframeworkthatisaddedautomaticallybyCOTGtemplatewizards.
l
AftercreatingaCaptureOnTheGotemplateusingawizard,youcanfindmoreready-made
elementsintheSnippetsfolderontheResourcespane.
3. Creating mockups.Amockuporwireframewillhelpyoutolayouttheformandallowsyourcus-
tomertoprovidefeedbackearlyintheproject.Thiswillsaveyoualotoftime:typicallyitiseasier
tochangethesketchthantoreworkthecode.Inaddition,mockupsprovideawaytodousability
testingbeforeactuallycreatingtheform.
Notethatmobiledevicescomeinvarioussizes.Itisimportanttoadapttheformdesigntothese
screensizes.Therearevariousfreeandcommercialmockupapplications(bothonlineandoff-
line),butasketchonpaperwilldotoo.Checkoutthefreemockuptemplatesfrom
Page 522