Support

Account

Home Forums Add-ons Repeater Field Use of repeater field with conditional logic Reply To: Use of repeater field with conditional logic

  • It’s mostly the difference in interfaces. For simple things like what you’re doing a repeater is likely a good choice. A flex field takes it to the next level where there are many differences between rows. I am working on a complex project now that uses a flex field. If I tried to use a radio field I’d have many hundreds of fields in a single repeater and I’d have to set conditional logic on hundreds of fields and I’d need to make sure I named every one of the repeater sub fields uniquely. Then on top of that I’d need to built the conditionals into my templates making the coding far more complex. In this case, the layout name takes the place of the radio field and I can load different template parts based on that name in order to reduce code complexity.

    In a nutshell, a repeater field is best when all of rows will have mostly the same fields and type of content while a flex field is best when there will be many differences between the rows. However, you need to weigh the differences against the usability of the interface. A repeater with a single field that changes based on a radio button is far easier to work with for the average person than a flex field would be when used for the same purpose.