# Combined questions — short process (for another project)

**Copy the block below:**

---

1. Store links in **`combined_question`**: each row is `(main_question_id → child_question_id)`; both point at **`questions`**.

2. **API:** When loading questions (for the form builder or for filling a form), read that table and attach **`child_question_ids`** on mains and **`main_question_id`** on children.

3. **Form builder:** Hide children in the list. User picks only **mains** → app **adds all child IDs** to the form’s question list automatically; removing a main **removes its children** too. The form still saves a **flat** list of question IDs.

4. **Answering:** Show **main, then its children under it** (children not duplicated at the top). Save answers like any other question—**one answer per `question_id`**; the link table is only for grouping, not a separate answer store.

---

**One line:** *Link table defines main→child; API enriches questions; builder auto-adds children when you pick a main; submission shows grouped; answers stay normal per question.*
