Articles in this section
Category / Section

9.3 Show Elements Based On User`s Selection

Published:
Updated:

A Single Select element may also be used to have the user select between various options and then showing or hiding elements based on that selection.

In this example we have two types of something, type A and type B. We can choose between A or B, or both. A grid called Name is invisible (hidden) at first. When A is chosen, grid row 1 will become visible. When B is chosen, grid row 2 will become visible. And you guessed it; when A and B is selected, both rows will show in the form. This is a ‘mixed’ logic we will set up in the form as follows:

931.png

In the grid Name, row 1 and 2 are both Disabled and Hidden in Element properties so the grid is hidden.

In the Preview panel the form looks like this when opened:

932.png

When A and B is selected, the form looks as follows:

933.png

We can use the following two rules (defined in the top Form element) to define the logic we need:

934.png

Left: If A or A and B is selected, display row 1.
Right: If B or A and B is selected, display row 2.

Note: In a case like this one may try to define 3 rules for each of the start options, one for A, one for B and one for A and B. If we only had two options, A or B, this logic works fine. When the options are mixed, we must use the logic displayed here. We then only need 2 rules, one for showing row 1 and one for showing row 2. This logic is based on the result, not the start options.

Was this article useful?
yes
No
Help us improve this page
Please provide feedback or comments
Access denied
Access denied