What's the best way to break up forms for registering households and their members?

I love this thorough answer, @MinimalPotato! And I agree with you @Stephen_K_ojwang that in some cases it can be advantageous to combine forms. Entities with parent/child relationships is not something we support ideally yet so there are certainly tradeoffs. In the future, we intend to make it possible to update multiple Entities with one submission, including multiple ones of the same type within a repeat. That will make these kinds of relationships easier to establish and manage over time.

I think the tradeoffs are fewer now with offline Entities, though. With offline Entities, the household Entity created by Form 1 in @MinimalPotato's first approach will be available immediately in any forms that use the household Entity List. This gives you more options for minimizing or eliminating the need for data cleaning around the relationship between households and their members. This is also the approach I would tend to use. You would end up with two Entity Lists: households and household_members (or similar names). Each household_members Entity would have a link to the households Entity it is part of.

In Form 1.1 and other follow-up forms, you could still have your data collectors enter in a household id in a text field but then you could use that household id to look up information about the household, even if it was just created. This also lets you show information like the creation date and show a helpful error message if the household id entered doesn't match any existing registered household. You can also show all members that have been added to the household so far.

Instead of having data collectors enter the household id in a text field in Form 1.1 and others, you could instead start your follow-up forms by showing either all households or all households recently registered (e.g. in the last 3 days) in a select (from map, with autocomplete appearance, etc). Even though you can only create a single Entity with a form submission, you can attach any number of Entity Lists to a form.

Offline Entities require Central v2024.3.0 which was released last week. It also requires Collect v2023.3.0+ which has been in the Play Store for a little over a month.

You may also be interested in reading some previous threads about Entities with parent-child relationships like this one with @Baptiste_Monnier (@Baptiste_Monnier I just remembered this exchange we'd had! Hopefully offline Entities help you too).

2 Likes