Complex conditional logic: how to change the display of pages in a form

The survey on Altcraft Platform can be configured so that after answering a question, the user sees certain fields on the form. Such configuration is possible by adding conditions.

In the forms, the conditions can be simple or complex. With the simple conditional logic, you can show a respondent one follow-up question. With a complex condition, you can show a respondent an entire section of follow-up questions on a separate page.

Here are several examples of appropriate usage of complex conditions in Altcraft Platform forms.

Case 1. A company conducts an NPS survey to find out how satisfied customers are. There are two ways to do this:

  1. The respondent scores the service higher than average. In this case, the company thanks them for their high score, offers to choose what exactly they rate most highly, and asks them to tell you what could be improved.

  2. The respondent scores the service below average. This is where the company finds out the reasons for dissatisfaction and asks for advice on how to make things better.

The form 1

Case 2. An online course platform adds a survey to the welcome email to further personalize the content. The first question determines the potential customer's area of interest: Web design or Digital marketing. Depending on what the respondent chooses, they are redirected to a particular page. The questions on both pages are of one kind:

  1. Are you planning to further take up one of our online courses?

  2. Would you like to attend our upcoming webinars?

Although the answers vary depending on what a user chose in the first question.

So, let’s find out how to redirect a user onto a certain page of the form depending on the answer.

Stage 1. Figure out the logic

Work out the sequence of switching from one page to another. To do it, think of the answers to the questions:

  1. How many pages are there in the form?

  2. What pages should be displayed to all the respondents, and what pages should be displayed only to those who met a certain condition?

  3. Depending on what condition a particular page is displayed?

  4. What field contains the condition for switching to a certain page?

The condition can be added only to those fields that require the user’s choice:

  • Yes/No

  • One choice

  • Multiple choice

  • Range

Stage 2. Add the pages and the surveys to the form

Now you can proceed to working on the platform. Create a new form and configure its general settings. Then switch to the Constructor tab. Add pages and fields for each of them.

Keep in mind that depending on the user’s answer a certain page, not an additional field on the same page is viewed. That’s why you should create a page for general questions and other pages for specified questions.

Let’s have a closer look at the example of the second case (the online course). At the first page we’ll ask a single question about the sphere a person is interested in. We should create a page and add One choice element on it.

page 1 one choice element

Let’s add another page that will be viewed to those users who chose English language. Then add Multiple choice element to view it to the users who chose English language and add the multiple choice options there.

page 2 multiple choice

And finally let’s add the third page for those who chose Digital marketing. As the elements are the same, you can just copy the previous page and edit the text in the options boxes.

page 3 multiple choice

Stage 3. Enable the logic

Save the form by clicking the Apply button. Then go to the Logic tab and switch the Enable button on the right side to activate the complex logic. The editor will be viewed:

Each block is a separate page. The lines between them show the sequence of a user's transition between pages. Тow it is a linear sequence, i.e. the user will go through all the pages one by one. This approach isn't appropriate in our case.

Let's remove all the logical connections. To do this, place the cursor on the line and click on the cross that appears:

logic remove the line

Now let's organize the logic of our own. For convenience, first arrange the blocks in the right order. To do this, left-click and move the block.

arranging the blocks

Stage 4. Add the condition

To add a condition to the form, click the + icon on the left and select Condition. A diamond appears in the editor. You can move it, too, to a visually convenient place:

the diamond condition

Right-click on the diamond, and on the right the window opens, where you can configure the condition. Click the Add condition button. Select the field with the question, the answer to which determines the transition to the required page.

condition question

Stage 5. Configure the connection between the blocks

All that's required now is to tie up the form pages in the proper sequence. To do this, click the icon on the border of the block and draw a line to the page you want the user to go to.

condition connection

The gray line links the switch between pages without conditions. The green line is the transition if the user's answer meets the condition. The red one is if the condition is not met.

Stage 6. Check the logic of transmission

We should make sure that the form works as intended. To do that, you'll need to open a preview of the form. You can do this in two ways: click on the preview icon on the top panel or go to the Appearance tab.

The preview is interactive, i.e. you can click on the answer choices and enter your values. Take the survey several times to test every possible customer behavior.

testing the form

If everything is configured correctly, save the form. You can then publish the form and embed it on the site page or send a newsletter email with a link to the form.

You may be interested