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...
- <div class="@(count <= 1 ? "step-pane active" : "step-pane")" id="@Records" data-validation="subCommonForm(0, '@Records')">
- <div class="panel panel-primary">
- <div class="panel-heading"></div>
- <table class="table" id="SubScreen">
- <thead>
- <tr>
- <th>
- Que.No
- </th>
- <th>
- Questions
- </th>
- @foreach (var Records1 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))
- {
- <th>@Records1.SubjectTitle; (@Records1.EmployeeName)</th>
- }
- </tr>
- </thead>
- <tbody>
- <span style="visibility: hidden">@{int srno = 0;}</span>
- @foreach (var Questions in Model.SubjectTypeAndQuestion.Where(x => x.SubjectTypePID == Records))
- {
- srno += 1;
- <tr data-que-id="@Questions.FeedBackQuestionnaireID">
- <td>@srno</td>
- <td>
- @Questions.QuestionDescription
- @*<input type="hidden" value="@Questions.FeedBackQuestionnaireID" name="FeedBackQuestionnaireID" id="FeedBackQuestionnaireID" />*@
- </td>
- @foreach (var Records2 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))
- {
- <td>
- <select id="FeedBackRatingID" name="FeedBackRatingID" req="true" valsection="@Records" valdata="int" data-fsm-id="@Records2.FacultySubjectMappingID" class="FeedBackRatingID">
- <option value="0">Select Rating</option>
- <option value="1">VeryPoor</option>
- <option value="2">Poor</option>
- <option value="3">Good</option>
- <option value="4">VeryGood</option>
- <option value="10">Excellent</option>
- @*@Html.LookupDropDown((Dictionary<object, object>)ViewBag.FeedBackRatingID)*@
- @*@Html.DropDownValues("FeedBackRating", "FeedBackRatingID", "FeedBackRatingName")*@
- </select>
- </td>
- }
- </tr>
- }
- </tbody>
- <tfoot>
- <tr>
- <td></td>
- <td>
- Comment
- </td>
- @if (Model.SubjectTypeAndQuestion.Where(x => x.SubjectTypePID == Records).Count() > 0)
- {
- foreach (var Records2 in Model.SubjectAndFacultyList.Where(x => x.SubjectTypePID == Records))
- {
- <td>
- <textarea id="FeedBackComment" name="FeedBackComment" data-fsm-id="@Records2.FacultySubjectMappingID" rows="4" maxlength="1000"></textarea>
- </td>
- }
- }
- </tr>
- </tfoot>
- </table>
- </div>
- </div>