2022.2

Table Of Contents
Tip: UsetheOutlinepaneatthelefttoseewhichelementsarepresentinthetemplateandto
selectanelement.
UsetheAttributespaneattherighttoseethecurrentelement'sID,classandsomeotherprop-
erties.
UsetheStylespanenexttotheAttributespanetoseewhichstylesareappliedtothecurrently
selectedelement.
Tip: ClicktheEdgesbuttononthetoolbartemporarilyaddsaframetocertainelementsonthe
Designtab.ThesewillnotPrintoroutput.
HowtomakeCOTGelementsrequired
TomakeaCOTGelementrequired,ortochangethevalidationofaCOTGForm,right-clicktheele-
mentandchooseValidation settings.SettheForm'svalidationmethodtojQueryandsettherequire-
mentsandamessageperfield.Foranexplanationsee"ChangingaForm'svalidationmethod"on
page643.
ChangingwidgetsettingsinHTML
TheCameraandGeolocationwidgetshaveconfigurableoptions;youcandecidewhichbuttonswillbe
visibleintheCameraelement,forexample.Anumberoftheseoptionscanbesetviatheuserinterface
(see"Elementspecificsettings"onthepreviouspage).
ThesettingsarestoredinJSONformatinthedata-paramsattributeoftheelementintheHTML,as
youcanseeontheSourcetabintheDesigneraftermakingasetting.
Alloptions,includingoptionsthatcannotbesetviatheuserinterface,canbesetviathisdata-
paramsattribute.Todefineatimeoutof6secondsforaGeolocationelement,forexample,youcould
switchtotheSourcetabandchangeitsHTMLto:
<div id="geolocation1" role="cotg.Geolocation" data-params="{&quot;-
timeout&quot;:6000}">.
SettingsintheHTMLoverridethedefaultsettingsforthatelement.Theyareappliedtothewidgetwhen
theFormiscreatedandcannotbechangedafterwards.
ForacompletelistofoptionsseetheCaptureOnTheGoAPI:"CaptureOnTheGoAPI"onpage557.
Settingsforadynamically addedelementcanbemadeincode;see"DynamicallyaddingCOTGwid-
gets"onpage548.
ThedefaultsettingsthatarespecifiedintheCOTGplugincanalsobechangedincode;see"Changing
defaultsettingsforwidgets"onpage547.
Page 538