Answered

Logic - Loop cycle

  • 5 August 2022
  • 4 replies
  • 214 views

Hi there. We have a problem – could you please let us know what is the easiest way to make the following:

We are making a registration form and we have a question there: “How many people you wan to register”.

If the answer is 2 or more, we need s specific loop cycle where after filling all the information about one person, client would be redirected to a specific field from previous to start filling information for another person. So depending on how many people he choose (2, 3, 4 or more), that many cycles there would be.

How can we do that?

icon

Best answer by john.desborough 5 August 2022, 12:58

View original

4 replies

Userlevel 7
Badge +6

@krepsinisLT - create a series of question groups with the questions for each registrant up to the maximum number you might thing could be added (say 10 for example). ask a question about the number of folks they want to register in this particular visit to the form and set that number into a variable. at the end of the first question group subtract 1 from the ‘number to be entered variable’ and if it is greater than 0 then go to the next input question. if 0 jump to the ending 

here’s a short example that i created a while back - let me know if this is the sort of thing you want to create and i will put some screen shots of the logic here. 

 

des

Hi there. Thanks a lot. Can you explain more about this part:
“the end of the first question group subtract 1 from the ‘number to be entered variable’ and if it is greater than 0 then go to the next input question. if 0 jump to the ending “

Where it has to be made? What exactly should be written there? 

 

As for now, the questions starts where a person needs to enter a number from 1 to 4. Then it goes to the Group questions (for first person). The group questions ends with  Multiple choice question. How to make sure what it would let enter details for another person if two or more were selected? A new group of questions has to be created?  Screenshots would be very helpful. Live chat or email communication would help too.

Userlevel 7
Badge +6

@krepsinisLT 

  • start with a question that asks the number of registrants and add that value to a variable with a logic rule
  • if you have the first question group already made, then you can duplicate that question group for the maximum number of people you want to be registered by someone Ie 4 or 10
  • on the last question in a question group, use the logic rules in the branching and calculation area of simple logic to do that calculation
    • if someone said they wanted to enter 4 people, on that question you create the logic rule that assigns the variable with the number of registrants (ie question groups) that you will have to expose
    • on the last question of the first question group you add  logic rules that says something like this
      • always subtract 1 from variable_counter 
      • if variable_counter = 0 go to ending
      • if variable_counter is greater than 0 go to the first question in the next question group
    • do the above logic rules in each question group. 

 

Is there a way to copy the connection without redoing it from the start. For ex if i make the group of question how do i duplicate them to have the same connection as the parent one. 

 

 

Reply