Solution for a what could be done with nested repeaters

By: Nejc Podlogar | Asked: 09/22/2024
ForumsCategory: How-toSolution for a what could be done with nested repeaters
Nejc Podlogar asked 4 weeks ago
Hello everyone.

I've got a question. In the forms as far as I understand, you cannot nest the Repeater.

So now I am stuck with a proposition. I need to create a form with the following sections:
  • "Vod" (Group) that has a couple of the elements like name, and another drop-down field to it.
  • "Udeleženec" (participant). In this part there is a lot of different fields. This is a repeatable section (up to 9)
  • "Vodnik" (leader). Here are almost the same fields as in the participant part but there could only be 1.
  • "Document" - A signed document uploaded (only 1 document for the whole form)
  Now the user, that is filling the form should be able to add multiple "Vod" (group) sections. For each group it can add up to 9 participants and 1 leader. At the end the user also uploads the file.

My question is, how could i implement this functionality. Also the Vodnik, Vod and Document are currently set up as Sections and the Udeleženec part is a Repeater.

Thanks in advance.

P.S. I am uploading an image of the current form that needs to be updated.
Attachments
1 Answers
Victor Font answered 4 weeks ago
As you already know, repeaters cannot be nested. You may not know that repeaters are not fields. They are actually embedded forms. The only way to accomplish what you want with your design is have the user create one entry for each group.
Nejc Podlogar replied 3 weeks ago

I also cannot nest the sections inside the repeater, right? Is it for the same reason?

Victor Font replied 3 weeks ago

Different reason, but no, you can't nest sections.

Nejc Podlogar replied 3 weeks ago

What about the section inside the repeater?

Victor Font replied 3 weeks ago

You cannot put sections inside repeaters.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right