I want to build an app with multiple Forms - What's the best practice?

Hi everyone I wanted to know everyone's opinion on how they would create an app with multiple forms. Say for example:

  • I have 30+ different consent forms for various services.
  • Each consent form has different column structures (some have 10 columns, some have 15)
  • Each consent form has different conditional logic (show_ifs are based on another input)
  • BUT we would still like to have a view of ALL forms (regardless of what kind of consent form) in 1 LIST/DECK view

Now my question is: Will you create one database for each form? or would you create one database for all forms with multiple columns?

0 2 120
2 REPLIES 2

I don't think there is a best practice or similar, it's a matter of taste and ease of config/maintain.

If all different forms use the same set of columns but some of them use a little bit less, use one table.

If they don't share columns in common, use different tables per form.

I agree with Oscar, there is no 100% right answer. That decision rests mostly on you, as the person who knows the most about all of the fine details that would affect the decision.

You may also consider some sort of templated or EAV (entity-attribute-value) approach, where the main table just holds generic columns like "question1", "answer1" , "question2",etc. Then you have a child table that defines a record for each question per form type.

As for the listing of all forms in one list, that's easy, just add a table listing all the different forms, and create a nav view from it with an appropriate row-select behavior.

Top Labels in this Space