This field lets you create a HTML template using Handlebars. The template can dynamically generate HTML by inserting the values of form fields, helper variables, and optionally, additional data supplied through this field's value (which can be set in the default function).
There's an example of this template being used in the Displaying Values and Variables knowledge base article.
Use this field with caution. It operates in the browser and all data supplied to the template by your default function will be present on the browser, even if it is not displayed by the template. The server-side version should generally be used in preference to this field.
Custom Functions
Custom functions can be called from the handlers of other fields using .invokeCustomFieldFn.
renderHTML - This will refresh the template, using the new values of any referenced fields or variables
Properties
Label | Description | Type Name |
---|---|---|
Summary | A short description of what the field does, displayed in the forms designer to help identify it | SUMMARY |
Template | The Handlebars template. Handlebars templates look like regular HTML, with embedded handlebars expressions. There's more information in the Handlebars Editors article | TEMPLATE |
Default | Default JSON data that will be supplied to the template. This is a JSON data object that may be used to replace | DEFAULT |
Update on Change | Whether to perform a refresh of the template output if a field value changes. The default behaviour will refresh if any field on the current page is updated. The "Fields" property can be used to restrict refreshing to specific field changes | UPDATEONCHANGE |
Fields | List of fields that, if updated, will trigger a refresh of the template output. Separate the names of fields with commas. If this property contains an asterisk or an empty string it will refresh on all field changes. The "Update on Change" property must be true | REFFIELDS |
Default Function | A JavaScript function you can use to calculate the starting field value. This function is executed server-side when the field HTML is generated. See Common Field Properties for an example | DEFFUNC |
Manipulation Function | Data Manipulation function that can manipulate the JSON data object supplied to the template. This function is executed browser-side before generating any HTML. It is supplied with two parameters, a reference to the helper library and the current value of the JSON object. The second parameter is always supplied as a JavaScript JSON object. It will never be null or undefined | CALCFUNCTION |
Additional Styling Modifier | An optional CSS modifier for the field. See Common Field Properties for an example | ADDITIONALSTYLINGMODIFIER |
Documentation | Add documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an example | DOCUMENTATION |