2022.2

Table Of Contents
necessaryCaptureOnTheGoformelements(see"COTGElements"onpage633),stylesheets
andJavaScriptfiles,andextrapre-madeelements.
AddingaForm
ThisproceduredescribeshowtoaddaFormelementtoanexistingWebcontext.
1. OntheResourcespane,expandtheWebcontextanddouble-clickaWebpagetoopenit.
2. TousetheFormWizard,selecttheInsert > Form Wizardmenuoption.TheFormWizardaddsa
FormtotheWebpageincludingthespecifiedfields.
Alternatively,youcanselectInsert > Formonthemenutoopenadialogthatletsyousetthe
Form'sproperties,validationmethodandlocation,butdoesn'tallowyoutospecifyfields.Ifyou
choosethismethod,skipstep8and9ofthisprocedureandaddfieldsafterinsertingtheForm
(see"AddingelementstoaForm"onpage507).
3. AddanIDand/oraclass.ID'sandclassesareparticularlyusefulwithregardtovariabledata
(see"Personalizingcontent"onpage708)andstyling(see"StylingtemplateswithCSSfiles"on
page672).
4. IntheActionfield,entertheURLwheretheformdatashouldbesent.TheURLshouldbea
server-sidescriptthatcanacceptformdata.TheactionofaCaptureOnTheGoformshouldspe-
cifytheWorkflowHTTPServerInputtaskthatreceivesandhandlesthesubmitteddata.The
actionwilllooklikethis:http://127.0.0.1:8080/action(8080isWorkflow'sdefaultportnumber;
'action'shouldbereplacedbytheHTTPactionofthatparticularHTTPServerInputtask).The
methodofaCaptureOnTheGoformshouldbePOSTtoensurethatitdoesn'thitadatalimit
whensubmittingtheform.TheGETmethodaddsthedatatotheURL,andthelengthofaURLis
limitedto2048characters.EspeciallyformscontainingoneormoreCamerainputsmayproduce
avoluminousdatastreamthatdoesn'tfitintheURL.GETalsoleavesdatatrailsinlogfiles,
whichraisesprivacyconcerns.ThereforePOSTisthepreferredmethodtouse.
5. UsingthetheMethoddrop-down,selectwhethertheformshouldbesentusingtheGETor
POSTmethod.
6. Usingthenextdrop-down,selecttheform'sEncryptionType(enctype):
l
application/x-www-form-urlencoded:Default.Allcharactersareencodedbeforethey
aresent.Spacesareconvertedto"+"symbols,andspecialcharactersareconvertedto
ASCIIHEXvalues.
l
multipart/form-data:Nocharactersareencoded.Thisvalueisrequiredwhenyouare
usingformsthathaveafileuploadcontrol.
l
text/plain:Spacesareconvertedto"+"symbols,butnospecialcharactersareencoded.
Page 503