[SINCE Orbeon Forms 2018.1]
Templates apply to:
- Email Settings
- Control Settings
- Help Message
- Explanatory Text [SINCE Orbeon Forms 2019.1]
You define a template by setting a placeholder with the following syntax:
foois a name which must match one of the template parameters configured below.
You can add new parameters with the "+" icon and remove them with the "-" icon.
The following options are available for each template parameter:
- Parameter name: this must be unique among parameters.
- Parameter value:
- Control Value: the value of a form control.
- XPath Expression: calculated expression.
- All Control Values: the value of all form controls.
- This is only available for the email body.
- This is experimental as of Orbeon Forms 2018.1.
- Links [SINCE Orbeon Forms 2020.1]
- Links are available for the following:
- Email Body
- Help Message
- Explanatory Text
- Links include:
- Link to the "edit" page
- Link to the "view" page
- Link to the "new" page
- Link to the "summary" page
- Link to the "home" page
- Link to the PDF file
- Automatic PDF only [SINCE Orbeon Forms 2023.1]
- Image (form logo by default)
- Form title
- Page number
- Page count
NOTE: For the email subject and body, an XPath expression runs in the context of the form data's root element. However, the Form Runner function library is not yet available to expressions as of Orbeon Forms 2018.1. For labels, hints and help messages, the Form Runner function library is available.
A template may omit references to any or all template parameters.
[SINCE Orbeon Forms 2020.1]
Links are intended to point to some Orbeon Forms pages or resources (namely, the PDF file). The end user might see such links in explanatory text and email bodies, in particular.
To insert the URL, you use the template syntax within the "URL" field of the link dialog:
Form Runner requires the ability to know how to reach Form Runner. In some cases (use of a reverse proxy), Orbeon Forms cannot determine this automatically. For this purpose, the following property allows setting the external Form Runner URL. By default, it is empty, and can set it to an absolute URL as follows:
When the form definition has more than one language:
- Each language has its own localized template.
- Template parameters are not localized and are available no matter what language is selected.
In the following example of a dynamic control label, the
$namevariable refers to the subsequent
nameparameter. The Template Parameters section declares that
nameparameter to refer to the
This is how this would appear in the running form:
In the following example of dynamic email subject, the
$authorvariables refer also to the subsequent parameters.
The text of the template is localized as usual when the form definition has more than one language.