Skip to main content
The live form UI reads questions from a published FormTemplate. If Mongo has no published bank, getPublishedOrJson() loads src/data/formQuestions.json. Question bank admin Caption: Add screenshot showing /admin/questions with draft vs published, add step, reorder, and Publish.

Template statuses

draft | published | archived version is unique. Publishing clones the draft into a new published version; existing forms keep questionBankVersion.

Super Admin routes

Authenticated users load the bank they should render: GET /api/question-bank?schoolYear=2026-2027&version=3

Safe edits vs breaking edits

Change title, placeholder, description, required, active, order. Keep question.id unchanged.
Renaming id, deleting a question that already has answers, or reshuffling ids. Old formData[stepKey].data[oldId] would orphan.
Publish requires { "confirm": true }. Optionally pass schoolYear to pin that version on SchoolYearSettings.questionBankVersion.