I'm writing a web application to manage a family tree. Each new user is required to input their name and select their parent from among all the parents in the database. If the parent does not exist, they are allowed to create him/her.

What about deeper creation? For example, say a grandchild would like to add him or herself, but both their parent and their grandparent is not in the database? Should I continue to pop-up another "create parent" dialog? Or is there a better way to do this (a "flatter way" that does not require stacking pop-up windows on top of one another).


It seems to me that to make a family tree you'd want to make a visual representation of it, and offer simple options like an input box in specific areas, all of which relate to the user. For example, everyone has two parents so they should have two parent fields. Then they each must have two parents, ad infinitum. Siblings and children, as well as cousins and all non-direct relatives, would have any number of input fields.

Since you have an existing database on entering a name it should scan for that name and attempt to match the two. If a relationship exists, then you can offer the user to fill out other data automatically. For example, if my brother already filled out our parents and then I joined and started adding my father, then my mother should populate on agreeing that the first relationship (my father) is accurate. Then my brother would populate, as well as any other relationships he entered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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