2022.2

Table Of Contents
l
TheIDand/orclass.ID'sandclassesareparticularlyusefulwithregardtovariabledata
(see"Personalizingcontent"onpage708)andstyling(see"StylingtemplateswithCSS
files"onpage672).
l
AnAction:theURLwheretheformdatashouldbesent.TheURLshouldbeaserver-side
scriptthatcanacceptformdata(aWorkflowprocessthatstartswithaServerInputtask,
forexample).
l
AMethod:thisdefineswhethertheformshouldbesentusingtheGETorPOSTmethod.
l
AnEncryptionType(enctype):
l
application/x-www-form-urlencoded:Default.Allcharactersareencodedbefore
theyaresent.Spacesareconvertedto"+"symbols,andspecialcharactersarecon-
vertedtoASCIIHEXvalues.
l
multipart/form-data:Nocharactersareencoded.Thisvalueisrequiredwhenyou
areusingformsthathaveafileuploadcontrol.
l
text/plain:Spacesareconvertedto"+"symbols,butnospecialcharactersare
encoded.
Changing a Form's validation method
InConnectPlanetPressConnect,therearetwowaysinwhichaForm'sinputcanbevalidated:
l
TheBrowservalidationmethodleavesituptothebrowsertovalidatetheuserinput.When
addingfieldstotheForm(seethenextstep)youcanonlymakefieldsrequiredandsetthemax-
imumlengthasanadditionalrequirementforsomefields.
l
JQuery ValidationvalidatesinputusingJQueryscripts.Thisallowsforstricterrequirementsper
fieldandadifferentmessageforeachfieldtodisplaytotheuseriftheinputisnotvalid.This
methodensuresamoreconsistentvalidation,asitisbrowserindependent.Thenecessary
JQueryfileswillbeaddedtotheJavaScriptfolderontheResourcespanewhenthisoptionis
chosen.
TochangeaForm'svalidationmethod:
1. Right-clickontheFormelementandchooseValidation settings.
2. Chooseavalidationtype(seeabove).
3. Double-clickeachfieldinthelisttoedittheirvalidationsettings:
l
Required:Checkifthefieldisrequiredtosubmittheform.Ifafieldisrequiredbutcontains
nodata,amessagewillbeshowntotheuser.
Page 643