How to render survey questions and possible responses to end user? RRS feed

  • Question

  • I have 3 customized entities ( Survey, Question, Response).

    The response entity has QuestionID (as foreign key) and SurveyId (as foreign key).

    SurveyID=10 has a SurveyName="Student Health Questionnaire"
    QuestionID=1 has questionText="Who is your current health provider?"
    QuestionID=2 has questionText="What is your height?"
    QuestionID=3 has questionText="What is your weight?"
    QuestionID=4 has questionText="Check medical symptoms below" where the user will be present multiple check boxes such as Diabetes, Blurry vision, Fatigue, Nausea, Dizziness etc....

    ResponseID=1 maps to a particular user answering SurveyId=10,QuestionID=1
    ResponseID=2 maps to a particular user answering  SurveyId=10,QuestionID=2
    ResponseID=3 maps to a particular user answering  SurveyId=10,QuestionID=3
    ResponseID=4 maps to a particular user answering  SurveyId=10,QuestionID=4

    I am stuck on what to do to present the end user a form where the question text of the 4 questions and their response text boxes/check boxes/dropdown lists can be displayed -- in other words I need a form that looks as below:

    Student Health Questionnaire
    1.  Who is your current health provider  (text box for free text response)
    2.  What is your height (text box for free text response)
    3.  What is your weight (text box for a numeric response)
    4.  Check medical symptoms below: (checkbox) diabetes  (checkbox) Blurry Vision (checkbox) Fatigue (checkbox) Nausea (checkbox) Dizziness

    I don't want to type the question text on that form. I'd like to be able to pull the question text from the question IDs of the Question Entity.

    Any suggestions are highly appreciated.

    Wednesday, April 3, 2013 9:54 PM