Use of {{ and }} text suppression braces.
This guide is referencing using text braces in field scripting. Click here to review the chapter on Field Scripting if you are not yet familar with this option.
By surrounding text and variables (field names in the @fieldName@ format) with double braces, you can tell the Online Template Builder system to suppress text when variables are blank. Any text contained in the {{}} braces will be suppressed if any variables within the braces are blank. Consider the following example:
|
Tel: @Telephone@, Ext @Ext@
Fax: @Fax@
Cell: @Cell@
@Email@
|
Assuming that the telephone extension and the cell phone are optional, you will need to either use vbscript to achieve the desired layout or use the text suppression double braces. By using the following syntax, you can suppress unwanted text:
|
Tel: @Telephone@{{, Ext @Ext@}}
Fax: @Fax@
{{Cell: @Cell@}}
@Email@
|
If the line suppression option is checked in conjunction with this HTML syntax, the following text will appear if the extension and cell fields are left blank:
|
Tel: 123.123.1234
Fax: 234.234.2344
sample@sample.com
|
If all fields were entered, the following text would appear:
|
Tel: 123.123.1234, Ext 123
Fax: 234.234.2344
Cell: 345.345.3455
sample@sample.com
|
Previous Chapter: Chapter 29 - Variable Data Template Creation - An Example
Next Chapter: Chapter 31 - Using Syntax Tags in HTML Field Scripting