About this article
This article will explain how to insert text elements from the Library through smart fields so it can be automatically inserted when generating a document.
- What is a text element insertion?
- How to insert text elements from the Library into a document with smart fields?
Text element
smart field examples
Prerequisites
|
|
What is a text element insertion?
There are two different types of text elements that can be inserted into a document:
- Static text element: the text element does not contain any questions in the response form. When dynamically inserting a static text element into a document, the end-user will be prompted with the document response form only.
- Dynamic text element: the text element does contain smart fields and at least one question in the response form. When dynamically inserting a dynamic text element into a document, the end-user will be prompted with a response form gathering both the document and the text element response forms. The
Text element placeholder
displayed in the document response form will dictate where the text element response form should appear for the end-user.
|
Furthermore, there are two different ways of inserting text elements into a document, either by using a static or a dynamic insertion:
- Static insertion: linking a specific text element to be inserted in the document.
- Dynamic insertion: linking a dropdown question in the response form where the user can pick an answer, which will insert the desired text element in the document.
When working with text element insertion, the asset ID of the text elements will be necessary. The asset ID can be found in the Admin Center, by navigating to the Text element Library, finding the relevant text element, clicking on the ellipsis menu, and using Copy asset ID
.
How to insert text elements from the Library into a document with smart fields?
When building a smart template, the Text element
smart field can be utilized to insert text elements into a document. To create a Text element
smart field, it will be necessary to specify the text element that should be inserted, the text elements can be inserted statically or dynamically using asset IDs inside a document. Creating a Text element
smart field can be achieved following these steps:
- In the Template Designer, navigate to the
Template
tab - Select the location where the text element should be inserted
Place your cursor at the desired location in the template, or select the text that should be replaced by the smart field. If no text is selected when adding the smart field, the display name will be inserted and used as placeholder text. Make sure your selection is not in-line as inline Content Control isn't supported for text element insertion (additional explanation below). - Click
Add smart field
This step doesn't apply if you are adding the very first smart field in the template - Click on
More
- Click on
Text element
- Enter a
Display Name
The display name will be displayed in theTemplate
tab once the smart field has been added. - Manually enter the
Asset Id
- For a static insertion, copy the asset ID from the Text element Library into the
Asset Id
field - For a dynamic insertion, create the desired binding linked to the response form using the binding syntax
- For a static insertion, copy the asset ID from the Text element Library into the
- Select the
Placeholder
When creating aText element
smart field, aText element placeholder
will be inserted in the response form. TheText element placeholder
displayed in the document response form will dictate where the text element response form should appear for the end-user. By default, a newText element placeholder
will be generated. If aText element placeholder
already exists in the response form, it will be selectable from the list. It can be disregarded if the inserted text element does not contain a response form.
- A new placeholder will be named 'Placeholder 1', 'Placeholder 2' etc., but can be renamed on the Form tab in the
Question title
field. For example rename 'Placeholder 1' to 'Disclaimer' if that is the content of the text element.
- A new placeholder will be named 'Placeholder 1', 'Placeholder 2' etc., but can be renamed on the Form tab in the
- Optionally, turn on
Replace on update
IfReplace on update
is checked, the inserted text element might be replaced when using the document content updater. By default, it's unchecked, disabling updates. - Click
Add to template
- The smart field will be injected into the template and will be displayed in the
Template
tab
- The smart field will be injected into the template and will be displayed in the
|
|
Text element
smart field examples
Inserting a text element using static insertion in a document in Word
Create a Text element
smart field linking to a text element containing a response form with two questions (Monthly salary and Currency, highlighted in red in the response form preview), and reordering the Text element placeholder
to ensure that the text element questions will appear at the right place in the response form of the document. The complete response form can be previewed by clicking on Preview form
in the Form
tab.
Inserting a text element using dynamic insertion in a document in Word
Create a Dropdown
question in the response form using " Employment" as the Reference Name
, linking to "EmploymentType" data source, and displaying the Name column. The data source itself contains text element asset IDs in the "InsertEmploymentType" column. Therefore, we will be using {{Form.Employment.InsertEmploymentType
as a binding in the Asset Id
field of the Text element
smart field.
Each text element contains different questions:
- Permanent contains one "Start date:" question
- Temporary contains two "Start date:" and "End date:" questions
When generated by the end-user, the text element inserted into the document will depend on the answer provided for the "Employment" question of the response form.
|
EmploymentType data source
Related articles
Comments
0 comments
Article is closed for comments.