Widget logic rules allow you to control the content that is going to be displayed to each respondent depending on specific criteria. Widgets are different formats of content that you can include in your PDF report.
This a way to display data, for example, in graphs or tables, based on the respondent's answer. If you include variables in the data fields of a graph or text, it will display customized data from the responses. You could choose to show an answer given to a question, the score from a question or question block, or many other variables.
You can create rules so that your content is only displayed when certain criteria are met, however If you want to show a general widget that is visualized every time a PDF report is generated, you can choose not to include any rules.
This guide will teach you:
- Setting up a widget
- Set up logic rules (Previous Report Builder)
- Set up logic rules (Renewed Report Builder)
1. Setting up a widget
Start adding the widgets that allow you to create a fully personalized PDF report for each respondent. There are many different options you can choose from, to create a professional report. Here is a full list, to learn how to add amazing personalized charts and content.
2. Set up logic rules (Previous Report Builder)
You can add multiple text widgets to create different text versions for each outcome you have in your questionnaire. To have the PDF show the right text you can add conditions, similar to the rules in our survey editor. Click on the widget to expand it and then click add rule. Select which condition from the drop-down menu should be used to decide when to display this block of content.
Once you've chosen the initial condition, you can specify exactly what conditions need to be met. If you need a more complex condition, click on the white square with a purple + sign to add criteria that will be in addition to the other criteria (AND), or instead of (OR).
2.3 Custom score
2.4 Language
2.5 Contacts
2.6 Formulas
2.7 Outcome
2.1 Answer on a question
In this case, you can select to show your content if an answer to a question is equal/not equal to a number or it is anything. This allows you to control exactly when this content will be displayed.
2.2 Response on Intro field
If you are using Intro fields, you can select them as a condition to display or not your block. You can choose a specific answer on Intro field, or set up any other rule you prefer.
2.3 Custom score
You can select between the custom score on question, question block or questionnaire or even combine those conditions to limit even more who can see a specific piece of content. Here you can see an example of a nested condition:
The limits you set up, when you use the "is between" filter, are included (in this case, 80 and 100 are included). Also make sure to set up your conditions in the correct order. The values should be put in from low to high.
2.4 Language
You can use the same PDF for your multiple languages questionnaire, but display different content blocks depending on the language.
2.5 Contacts
Use your contacts Email, Unique Identifier or Personal D, to display or not your content.
2.6 Formulas
If you have set up formulas or average formulas you can use them to define if and when your content will be displayed.
Average formula logic can not be combined with other logic rules.
2.7 Outcome
If you have set up outcomes, you can choose an outcome as the criteria for displaying your content. Choose outcome from the drop-down menu and then select what the outcome should or should not equal so that the content will be shown. You can set the outcome as the only criteria, or as an additional criteria as shown below. In this example, we clicked the orange + button and added that the content should be shown if both the response on intro field criteria AND the outcome criteria is fulfilled.
After setting up your conditions, don't forget to create a new response in order to see if it works.
3. Set up logic rules (Renewed Report Builder)
To add widget logic rules, select the widget and then at the right of the screen click on the gear button. The widget list will be replaced by the additional settings.
Click the Edit rule button.
When you click the Edit rule button a new pop-up window will appear.
Select from the dropdown menu the option you want, and then fill in all the required fields. Once you add everything you can click the Submit button.
If you need a more complex condition, click on the white square with a purple + sign to add criteria that will be in addition to the other criteria (AND), or instead of (OR).
Your content will not be displayed on the page anymore, instead of the content you will be able to see the widget logic rules.
If you would like to edit your content again just click on the rule and the widget will expand. To edit the rule you would have to click on the Edit rule at the settings.
This is the window where you can delete the rule by clicking on the Delete rule button.
Now let's see all the different options you can select from the dropdown menu.
3.3 Custom score
3.4 Language
3.5 Contacts
3.6 Formulas
3.7 Outcome
3.1 Answer on a question
In this case, you can select to show your content if an answer to a question is equal/not equal to a number or it is anything. This allows you to control exactly when this content will be displayed.
3.2 Response on Intro field
If you are using Intro fields, you can select them as a condition to display or not your block. You can choose a specific answer on Intro field, or set up any other rule you prefer.
3.3 Custom score
You can select between the custom score on question, question block or questionnaire or even combine those conditions to limit even more who can see a specific piece of content. Here you can see an example of a nested condition:
The limits you set up, when you use the "is between" filter, are included (in this case, 80 and 100 are included). Also make sure to set up your conditions in the correct order. The values should be put in from low to high.
3.4 Language
You can use the same PDF for your multiple languages questionnaire, but display different content blocks depending on the language.
3.5 Contacts
Use your contacts Email, Unique Identifier or Personal D, to display or not your content.
3.6 Formulas
If you have set up formulas or aggregate formulas you can use them to define if and when your content will be displayed.
Aggregate formula options:
- Average
- Minumum
- Maximum
- Standard deviation
Formula example:
Aggregate formula example:
Average formula logic can not be combined with other logic rules.
3.7 Outcome
If you have set up outcomes, you can choose an outcome as the criteria for displaying your content. Choose outcome from the drop-down menu and then select what the outcome should or should not equal so that the content will be shown. You can set the outcome as the only criteria, or as an additional criteria as shown below. In this example, we clicked the orange + button and added that the content should be shown if both the response on intro field criteria AND the outcome criteria is fulfilled.
After setting up your conditions, don't forget to create a new response in order to see if it works.
What's next?
- You can pre-fill the Intro fields (learn more about Intro fields ) to save respondents time and get their attention. If you have a field asking for the respondent's name, use a URL parameter to pre-fill this field if you already know their name and simply ask respondents to check the spelling, rather than making them enter data unnecessarily.
- Conditional Rendering is a way of displaying elements based on a condition. It allows you to create simple conditions and reduce the number of widgets and rules. With Conditional Rendering, you can render different UI markups based on certain conditions.
- Piping Variables are expressions within the site to reference other information that has already been provided. These variables can be used to display the score on a specific question or total questionnaire. You can, for example, add *|total_quiz_score|* to your final screen to say something about the respondent's quiz score.