Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Templates can have default values. The syntax is {<control name>=<default>} For example, this form also contains a controls labeled "Total Items in Cart" which is named "T". A template {T=0} would resolved to the value "0" when the field named T is empty otherwise it would resolve to the entered value.

[[image:Template_LabelHintHelp.png]]Image Added

The Shopping Cart section control contains templates its Label, Hint and Help.

[[image:Template_LabelHintHelp_PropSettings.png]]Image Added

The Help property contains this text:

...

Before the user starts entering values into this form they will see:

[[Image:template_HelpHint1.png]]Image Added

As a user begins entering values into the form fields, the templates will immediately begin appearing, and the user will see:

[[Image:template_HelpHint2.png]]Image Added

Repeat Controls

...

The syntax also allows for a optional separator. If you would like to get the list of phone number items separated by ", " (comma and space), use the following template: {, |Phone}. Other examples are {|Phone}, {,|Phone}, { |Phone}. The 1st template lists all the entered phone numbers with no separator. The 2nd uses a comma and the 3rd a space. If you used these three in a form's Doc Action Display Message and two phone numbers were entered 203.208.3117 and 203.208.3118 you would see this output for those three templates:

Phone Control Formats
Code Block
languagejava
title
203.208.3117203.208.3118
203.208.3117,203.208.3118
203.208.3117 203.208.3118 

Another example is {<br/> |Names} for a control named Names inside a repeat you would see the output:

Code Block
languagejava
titleName Control Output
Joe
Nancy 
James 

Repeat Item Labels

It is very useful to use templates with repeat controls. Imagine a long list of medications that appear on the form in a collapsed state. It is helpful if the section labels are not simply a static text such as "Medication" but rather dynamic and indicative of the values entered into the form.

[[image:Template_LabelHintHelp_Repeat1.png]]Image Added