Using templates to dynamically present HTML content from a form
Templates are a method of formatting text dynamically for presentation in . A template is suitable for dynamically creating an HTML document to be displayed in a view field or tool tip created by a Message action. When the template is evaluated at runtime, values are substituted for parameters in the template either using workflow or references to fields on the form.
A template consists of text with parameters that are replaced with values when the template is used for rendering. Usually, the result of processing the template is a complete HTML document, starting and ending with the <html> and <body> tags, or a snippet of HTML to be inserted in a document, such as, a group of table rows. Ensure that your HTML template is standards mode compliant.
template supports two ways of rendering HTML pages:
- HTML document template—A template built as an HTML document. It is rendered inside an IFRAME element. It contains its own scripts and styles and works in its own namespace.
Inline template—A template built as a simple HTML snippet. It is rendered inside a DIV element. An inline template supports styles and scripts. You can use the standard script tags to embed the scripts. The runtime client engine parses and evaluates these embedded scripts and makes them available when the snippet is rendered to the browser.
For HTML compliance across multiple browsers, only JavaScript is supported.
You must provide a namespace to the template to avoid conflicts with the internal core snippets.
To send events to the parent form for the inline template, use the ARMT_SendSignalToParent function. Below is the code snippet to use the function:
ARMT_SendSignalToParent("Event_Type","Event_Data", "DOM_element_reference")
The Document Object Model (DOM) parameter helps you to identify the immediate parent form.
For more information about templates, see the following topics: