@model ResponseQuestionnaireViewModel @{ ViewData["Title"] = "DisplayQuestionnaire"; Layout = "~/Views/Shared/_QuestionnaireResponse.cshtml"; }

@Model.Title

@Html.Raw(Model.Description)

@for (int i = 0; i < Model.Questions.Count; i++) { var question = Model.Questions[i]; string stepClass = i == 0 ? "active" : "";
@((i + 1)) @question.Type
}
@for (int i = 0; i < Model.Questions.Count; i++) { var question = Model.Questions[i]; @for (int j = 0; j < question.Answers.Count; j++) { var answer = question.Answers[j]; }

@(i + 1). @question.Text

@switch (question.Type) { case QuestionType.Text: @foreach (var answer in question.Answers) { } break; case QuestionType.CheckBox: case QuestionType.Multiple_choice: case QuestionType.Demographic:
@foreach (var answer in question.Answers) {
}
break; case QuestionType.TrueFalse:
@foreach (var answer in question.Answers) {
}
break; case QuestionType.Open_ended: @foreach (var answer in question.Answers) { } break; case QuestionType.Slider: @foreach (var answer in question.Answers) { 50 } break; case QuestionType.Rating:
@foreach (var answer in question.Answers) {
@answer.Text
}
break; case QuestionType.Ranking:

drag and drop to move the answers

    @{ int index = 1; } @foreach (var answer in question.Answers) {
  • @index. @answer.Text
  • index++; }
break; case QuestionType.Likert:
@foreach (var answer in question.Answers) { }
break; case QuestionType.Matrix:
@foreach (var option in question.Answers) { } @foreach (var option in question.Answers) { }
Question@option.Text
@question.Text
break; case QuestionType.Image:
@foreach (var answer in question.Answers) {
Image option
}
break; default: break; }
@if (i > 0) { } @if (i < Model.Questions.Count - 1) { }
}
@section Scripts { @{ } }