sharad bhadalkar

sharad bhadalkar

  • NA
  • 37
  • 3.5k

Feed back from Condition (When select drop-down value)

Jan 22 2020 2:48 PM
When select drop-down value is (veryPoor Or Excellent) Then Comment is mandatory field (Validaction)
 
Two column each column drop-down are 7
 
when column value selected very poor that column textarea comment is mandatory
 
Code...
  1. <div class="@(count <= 1 ? "step-pane active" : "step-pane")" id="@Records" data-validation="subCommonForm(0, '@Records')">  
  2. <div class="panel panel-primary">  
  3. <div class="panel-heading"></div>  
  4. <table class="table" id="SubScreen">  
  5. <thead>  
  6. <tr>  
  7. <th>  
  8. Que.No  
  9. </th>  
  10. <th>  
  11. Questions  
  12. </th>  
  13. @foreach (var Records1 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))  
  14. {  
  15. <th>@Records1.SubjectTitle; (@Records1.EmployeeName)</th>  
  16. }  
  17. </tr>  
  18. </thead>  
  19. <tbody>  
  20. <span style="visibility: hidden">@{int srno = 0;}</span>  
  21. @foreach (var Questions in Model.SubjectTypeAndQuestion.Where(x => x.SubjectTypePID == Records))  
  22. {  
  23. srno += 1;  
  24. <tr data-que-id="@Questions.FeedBackQuestionnaireID">  
  25. <td>@srno</td>  
  26. <td>  
  27. @Questions.QuestionDescription  
  28. @*<input type="hidden" value="@Questions.FeedBackQuestionnaireID" name="FeedBackQuestionnaireID" id="FeedBackQuestionnaireID" />*@  
  29. </td>  
  30. @foreach (var Records2 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))  
  31. {  
  32. <td>  
  33. <select id="FeedBackRatingID" name="FeedBackRatingID" req="true" valsection="@Records" valdata="int" data-fsm-id="@Records2.FacultySubjectMappingID" class="FeedBackRatingID">  
  34. <option value="0">Select Rating</option>  
  35. <option value="1">VeryPoor</option>  
  36. <option value="2">Poor</option>  
  37. <option value="3">Good</option>  
  38. <option value="4">VeryGood</option>  
  39. <option value="10">Excellent</option>  
  40. @*@Html.LookupDropDown((Dictionary<object, object>)ViewBag.FeedBackRatingID)*@  
  41. @*@Html.DropDownValues("FeedBackRating""FeedBackRatingID""FeedBackRatingName")*@  
  42. </select>  
  43. </td>  
  44. }  
  45. </tr>  
  46. }  
  47. </tbody>  
  48. <tfoot>  
  49. <tr>  
  50. <td></td>  
  51. <td>  
  52. Comment  
  53. </td>  
  54. @if (Model.SubjectTypeAndQuestion.Where(x => x.SubjectTypePID == Records).Count() > 0)  
  55. {  
  56. foreach (var Records2 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))  
  57. {  
  58. <td>  
  59. <textarea id="FeedBackComment" name="FeedBackComment" data-fsm-id="@Records2.FacultySubjectMappingID" rows="4" maxlength="1000"></textarea>  
  60. </td>  
  61. }  
  62. }  
  63. </tr>  
  64. </tfoot>  
  65. </table>  
  66. </div>  
  67. </div>  

Attachment: Feedback.rar

Answers (2)