Repeating Sections? - Post ID 219904

User 207904 Photo


Registered User
6 posts

Is it possible to add repeating sections in a form?

Such as user has selected one item, click a button to add another?
User 187934 Photo


Senior Advisor
20,271 posts

You would use the built in conditionals to do this.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Charles,

You can do this very trickily using the Show Element (conditionals) feature of the program. Take for example one of the most common uses of what you're asking about, which would be adding family members. Many times you see a form that asks you to fill in let's say childrens names. Sometimes you see a button to add another child and sometimes other ways to add more. In the Form Builder's case what you would do is base it on a Radio or Checkbox button. In other words it would be like so:

How many Children live in the household?
O 1 O 2 O 3 O 4 O 5

The O's above represent the radio button to select. Now you create a bunch of Name fields 1 for each child. You then make those fields tied to conditionals using the Show Element feature. When they choose 1, then only 1 shows up, when they choose 2, then the first and second one show up. It's tricky because you have to tie some of them to multiple selections to make them all show up, but it's not too hard to do and it's quite a cool feature.

You would do this by:

1. Choosing the first Name field and setting the Show Element to Using Display Rule.
2. Set the If to the name of the field you give the radio button with the question of how many children. I would name it something like numberchildren or something so you can always tell which field it is. Always name your fields so you know what they are.
3. Toggle the next box to "is"
4. Set the next box to the number "1" (this represents the radio button for 1 that is chosen).
5. Click the Insert button (blue box with checkmark through it) to add the conditional. You'll see the code for it show up in the box below all those settings so you'll know that it went through and is set.

Rinse and repeat for each of the rest of them and remember that for number 2 you have to set 2 conditionals for radio buttons 1 and 2, and for number 3 you have to set 3 of them for radio buttons 1, 2, and 3 and so on down the line.

Here's the tricky part. When you do conditionals that will include multiple items like the above, you also have to set conditionals for the options they do NOT choose. This means when you're setting the conditionals for number 1, you also have to do 4 other conditionals for the above example to say the following:

Using Display Rule
If: numberchildren
is not
2

Using Display Rule
If: numberchildren
is not
3

and so on down the line to include all the choices that are not chosen. This keeps the fields from showing up periodically when they shouldn't. So in a sense each of the choices above will have both IS and IS NOT settings.

I hope that made some sense, but if not let me know and I'll try to put the example a little easier or set up an example set of fields in a form and attach it for you. Once you get the hang of it it's not too hard to do, just a little time consuming to be sure all the included choices are covered and that the unincluded ones are covered also. In the end you're basically saying:

Show this field if 1 is checked and if 2, 3, 4, and 5 are not checked.
show this field is 2 is checked and if 1, 3, 4, and 5 are not checked.
and so on down the line.

Hope that helps and let us know if you need more assistance.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.