I need some help for my new project. I am creating a conditional questionnaire where each user need to give answer few question to sign up. Each next question will appear based on the previous question answer submitted.
So I create schema for questions and answer.
Question Schema:
_id: Object Id,
name: String,
text: String,
hint: String,
skip: boolean,
type: String, // boolean, multiple, dropdown etc
children: Array //Ojbect Ids of child question
Answer Schema:
_id: Object Id,
question_id: Reference Id,
next_question: Reference Id,
text: String,
isBool: boolean
- Q.1: Admin can add/edit/delete the question so is there any update require to this schema ?
- Q.2: How can I manage nested question on same page ie how front-end will know next question will show on same page or next page? If I add one more field will be enough ?
- Q.3: How to avoid the question loop ie Q1->Q2->Q3->Q1.
Thanks in advanced guys.
via Pankaj Jatav
No comments:
Post a Comment