Form Generator · Question schema

Question schema

Every question needs at least id, step, fieldName, questionType, and visible. Type-specific fields (options, supportingProps, subComponents, acceptedFileTypes, …) depend on the component.

{
  id: 1,
  step: 1,
  fieldName: 'addVenue',
  question: 'Your venues',
  stepperTitle: 'Your venues',
  instructionText: 'Are you affiliated with a venue?',
  errorMessage: 'Please select an option',
  questionType: 'radio',
  visible: true,
  isOptional: false,
  options: [
    { id: 'yes', label: 'Yes', dependentQuestion: [2] },
    { id: 'no', label: 'No', dependentQuestion: [] }
  ]
}
  • Core types — radio, checkbox, select, textInput, dateComponent, fileUpload, finders (schoolSearch, parkFinder, …). See QuestionTypes in questionTypes.js.
  • Household types — householdMemberList, householdAccountOnboarding (require householdQuestionRenderers).
  • Gotchas — acceptedFileTypes must be an array of MIME types; Household list APIs nest under supportingProps; onboarding needs subComponents.radio.