Checkboxes and Dropdowns

The Encodian population engine supports some content controls.

Note: To work with content controls in template documents using Microsoft Word, you may need to Show the Developer tab on the ribbon.

Checkboxes

Document Preparation

Example Document: Encodian - Template Syntax - Checkbox.docx

Example JSON Data:

{
"checkbox": true
}

Follow these steps to configure the checkbox control:

  1. Add a checkbox content control to your template.
  2. Navigate to the Properties of the content control.
  3. Add a <<check>> tag to the title of the checkbox content control using the following syntax
<<check [conditional_expression]>>

Here, conditional expressions defines a condition upon which the value of the checkbox content control is to be set (checked = true or unchecked = false). The conditional expression must return a Boolean value.

Refer to: Conditional Expressions

While Populating the Word document, the Encodian engine will evaluate any expression declared within a check tag and set the value of the containing checkbox content control accordingly. The check tag itself is then removed.

Dropdowns

Document Preparation

Example Document: Encodian - Template Syntax - Dropdowns.docx

Example JSON Data:

{
"members": [
{
"listFirstName": "Efren"
},
{
"listFirstName": "Sanly"
},
{
"listFirstName": "Mark"
}
]
}

Follow these steps to configure the dropdown control

  1. Add a dropdown list content control
  2. Navigate to the properties of the content control
  3. Add a <<foreach>> loop to the title of the dropdown content to get the data you require to show i.e
<<foreach[member in members]>><<item[member. listFirstName]>><</foreach>>

The result will be a dropdown list showing the items you have selected

DropDown.png

Syntax Support

Please refer to our Template Design forum where our support team can help with template syntax / you can see solutions to common use cases.

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk