Forum Academy Marketplace Showcase Pricing Features

Add multiple kids to a parent

I am currently doing a small sort of user management system.
The user has a mask, where he can enter the data of a person, which then will be stored in the type “Person”. This person can have different numbers of kids. The kids data will be stored in the type kid, which is linked to the type Person with the persons unique id. In this case, each kid can have one parent and one parent can have unlimited kids.

Now comes the crux, I want to be able to dynamically insert all the kids data in the same mask, when I am inserting the parents data. When I click on Save, the kids and parents data are stored in their respective types. Here is an example of how that should look like (obviously this isn’t working, yet):

Thank you very much for your help :slight_smile:

@simon.hirt You can have a RG that searches for the kids already created for this person, therefore, when adding a new kid it will be visible in the RG. Just add a RG (1 row, vertical ext) inside a group that collapses when searching for kids=0. Of course, inside each cell, you can add a button to edit/delete the kid. When editing, you can populate the inputs with the info of that kid. Therefore it can be useful to have a group where you have all the inputs (setting the group content to kid)

Thank you for the tipp, but the person and kids are not yet created. There is nothing in a database, the repeating group could search for.
That is also the big issue:
I want to insert data for the person, then insert the data for all the kids and after that, create the entry in the database

Ok, then just set a kids list state in the group holding the inputs. When a kid gets created (not necessarily saved to the DB), just display the kid in the list (kids state list plus item), and if you delete before saving remove it from the list. That’s one option