Table of Contents
Updated by Maarten Truyens
Every card, question and predefined answer can be subjected to one or more conditions. Those conditions can be configured by selecting the card/question/predefined answer, and changing settings at the right side of the screen.
Conditions "flow down": if a card's condition is not met, then the entire card will be hidden (with all the questions in that card). Similarly, if a question's condition (or its card's condition) is not met, the entire question will be hidden, with all the predefined answers.
If a question is not shown — either because its own condition is not met, or because its card's condition is not met — then its answer will be considered "void" and will not be assigned to the corresponding placeholder.
Shared conditions can be configured through the "Conditions" menu item at the top of the template editor.
Complex templates may involve many different questions, which may themselves involve many different conditions that define how all cards, questions and predefined answers interact with each other.
You will quickly notice that some conditions will be repeated several different times. For example, if you are creating a template for a service contract, you may want to create certain subquestions that only appear when the user is ordering at least 25 items of type X, or at least 50 items of type Y, and the total amount of such order exceeds 900 EUR.
While copying & pasting a complex conditions is quite easy to do — it involves just a few mouse clicks —it's usually not a great idea, as such conditions tend to change over time. If, for example, the minimum order amount would be changed to 950 EUR, then you may have to hunt through all the cards and questions to search for conditions that refer to that amount. This can become quite time-consuming and error-prone.
A better idea is to create a shared condition. In the shared condition editor, you can give a name to a condition, and then refer to that condition inside cards, question or predefined answers.
If you then have to change a shared condition, you should then only make the change in one central location.
Shared conditions also allow you to create complex logic that can be used for defining the behaviour of the text within your template, as further explained below.
Types of conditions
Conditions are always configured in a similar way — whether you are dealing with a shared condition or the condition of a card, question or predefined answer. Essentially, you select the relevant item (card, question, predefined answer or shared item) and then configure the condition at the right side of the screen.
When you click on the green + Condition button, you get a dropdown menu from which you can choose one of the following condition types:
- Answer to question. Make a condition that is dependent on the answer to a certain question. Depending on the question type, different types of conditions can be formulated:
- the answer to a yes / no question can be "true" or "false"
- the answer to a single text question is a piece of text, that can be checked for equality, inequality or (not) having certain text fragments
- the answer to a text question with multiple answers can also be checked for including one or more specific answers
- the answer to a (decimal) number or currency can be checked for equality, in equality, greater than or smaller than
- the answer to a date can be checked for equality, inequality, or being before or after some other date
- the answer to a duration can be checked for equality, inequality or being longer or shorter than some other duration
- Question enabled? Make a condition that depends on whether a certain question is enabled (which will be the case when that question and card either do not have a condition attached to them, or those conditions are indeed met).
- Card enabled? Make a condition that depends on whether a certain card is enabled (which will be the case when that card either does not have a condition attached to it, or such conditions is indeed met).
- Mandatory questions?. Make a condition that depends on whether all mandatory questions are (not) met.
- Shared condition. Make a condition that depends on the outcome of another, shared condition. Because that shared condition can on its turn depend on another shared condition, which can depend on yet another shared condition, and so on, you can create incredibly powerful conditions.
Each condition can host any number of sub-conditions, which can on their turn refer to their own sub-sub-conditions — any level deep.
- You can create a sub-condition by clicking on the green + Subgroup of conditions button.
- The interact between the sub-conditions is configured through the surrounding dropdown-list, that can be set to all, any or none.
For example, assume that a certain card X should only be shown when either product A or product B is selected, while simultaneously the court of Paris selected in some other question. Card X should, however, always be shown when some other card Y is visible — even when some other product or some other court is selected — except in the very specific circumstance that card Z is visible.
Such complex condition can be modeled as follows:
Copying & pasting conditions
When you hover your mouse over the set of conditions for a card/question or over an individual condition, the copy button at the right side will become visible.
Having clicked the copy button, the paste button will become visible as well. Clicking it will paste the (set of) condition(s) that you copied in the location that you indicated.