I'm building a genealogy site. One of the most important use cases is to create an individual. I want to use a single form to capture information that will be used to create up to five nodes after clicking submit. I've done a bunch of research, and found lots of stuff partially represented by the links below, but I haven't found anything that will do this. Can you point me to any modules to that do this? Or will I need to write my own module for this?

New Individual form captures the following fields:

  • Birth Given & Surnames
  • Current checkbox (checked if it's still individual's current name)
  • End date, if not current name
  • Current Given & Surnames - if different from birth
  • Start Date - if applicable
  • Date of Birth
  • Place of Birth
  • Date of Death
  • Place of Death

The form then creates the following five nodes:

  1. Individual node - with Title
  2. Name node for birth name
  3. Name node for current name (if different from birth name)
  4. Event node for birth
  5. Event node for death

Nodes 2-5 would have ER field_individual, to link back to the individual to which they are related.

Below are links to some of the resources I have found which are similar, but do not actually do what I'm looking to do:

closed as too broad by leymannx, GiorgosK, 4k4, Clive Apr 30 at 10:38

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Leymannx - Thanks for feedback. I thought I was being specific about asking if there was a module that does what I need, or if I need to build one. Looks like GiorgosK gave me some valuable guidance below. – Erik Britt-Webb Apr 30 at 17:37
  • I would start by looking at hook_entity_presave in a custom module. This will save you quite a lot of grief as you can create or update your referenced nodes at the same as editing the "Individual node" (1). – macjules May 1 at 11:29

I think you will need a custom module to do that

An outline of what your module should be doing

Not the answer you're looking for? Browse other questions tagged or ask your own question.