Content model for FAQ

Hey Guys,

I am very new to contentful, I need help how to contel model for FAQ…
There are three types of fields.
1.FAQ Group
—FAQ Question
------FAQ Answer

The logic is like any FAQ, In each FAQ Group can exist infinitely FAQ Question, and in each FAQ Question can exist 1-5 Answer…

Open to any kind of ideas on how to make this the easiest


Hi Vasko!

Thanks for your question, and welcome to Contentful Community.

The first thing I would consider is the purpose behind a single FAQ question needing multiple answers instead of only a single answer.

For example, do you need to display different answers for a single question based on certain contextual conditions? One use case may be to display a shorter answer in a mobile app, and a longer answer on the web. To accomplish this, it’s helpful to have an “Answer” content type which allows you to provide fields to define the context, e.g. “short”, “long”.

Next, I would consider whether five answers to a single question is a hard limit. Could this expand to six in the future? Could the number be reduced later?

Regardless of context, if you are always displaying the same answer(s) to a single question, and they are always in the same order, then I would consider using a single “answer” field as in option 3 below.

There may be more factors to consider for your particular use case, but here are some content model suggestions to get you started. In all cases, you can use this FAQ Group.

FAQ Group
Title [text]
FAQs [reference to FAQ content type, many]

Option 1
FAQ (option 1)
Question [text]
Answers [reference to FAQ Answer content type, 1-5]

FAQ Answer (option 1)
Title [text]
Answer [text]
(additional fields for context, etc)

Option 1 allows you to display answers conditionally, drag-and-drop to arrange them in the UI, extend FAQ Answers with additional fields in the future, and adjust the allowed number of answers later without data loss. Potential downsides include using an additional content type (which also affects the editing experience) which also adds additional entries.

Option 2
FAQ (option 2)
Question [text]
Answer 1 [text]
Answer 2 [text]
Answer 3 [text]
Answer 4 [text]
Answer 5 [text]

Option 2 allows you to enter up to five answers, but you cannot rearrange them without editing the fields, you cannot display answers conditionally, and reducing the number of allowed answers later will result in data loss. You do avoid having to create a separate content type for answers, but unless there is a compelling use case for separating the answers, I recommend option 3.

Option 3
FAQ (option 3)
Question [text]
Answer [text]

Option 3 is straight forward for editors, and is a common pattern.

Hope that helps get you going!