Проверка радио кнопки MVC 4 с ненавязчивой проверкой

Возникли проблемы с установкой переключателя для подтверждения. Только мои текстовые поля и текстовые области проверяются. Я попробовал кое-что из некоторых статей, которые я нашел в Интернете, и некоторые вопросы здесь, но я зашел в тупик.

Вот мой код:

ПОСМОТРЕТЬ

@using(Html.BeginForm("Submit", "Call_For_Entries", FormMethod.Post, new { @class = "contactForm" }))
    {
        @Html.AntiForgeryToken()

        @Html.ValidationSummary()

        <div class="form-wrap">
            <div class="form-left">
                <h4>CATEGORY OF SUBMISSION</h4>

                @Html.RadioButtonFor(m => m.submissionCategory, "Design (Making, Industrial Design, Textiles, Architechure, Robotics, etc)", new { id = "Design" }) 
                <label for="Design"><span class="button"></span> <span class="text">Design (Making, Industrial Design, Textiles, Architechure, Robotics, etc)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Entertainment (Gaming, Toys, Digital Media, etc)", new { id = "Entertainment" }) 
                <label for="Entertainment"><span class="button"></span> <span class="text">Entertainment (Gaming, Toys, Digital Media, etc)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Information Architecture (Big Data, Computing, Communications, etc)", new { id = "InformationArchitechure" }) 
                <label for="InformationArchitechure"><span class="button"></span> <span class="text">Information Architecture (Big Data, Computing, Communications, etc)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Fine Arts (Interactive arts, 4D, Art + Technology)", new { id = "FineArts" }) 
                <label for="FineArts"><span class="button"></span> <span class="text">Fine Arts (Interactive arts, 4D, Art + Technology)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Software (Mobile Apps, Augmented Reality, Health IT, etc)", new { id = "Software" }) 
                <label for="Software"><span class="button"></span> <span class="text">Software (Mobile Apps, Augmented Reality, Health IT, etc)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Education (Education Technologies, Children & Youth)", new { id = "Education" }) 
                <label for="Education"><span class="button"></span> <span class="text">Education (Education Technologies, Children & Youth)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Community (Art + Technology community programs, events or projects)", new { id = "Community" }) 
                <label for="Community"><span class="button"></span> <span class="text">Community (Art + Technology community programs, events or projects)</span></label><br />

                @Html.RadioButtonFor(m => m.submissionCategory, "Student (Higher Education projects)", new { id = "Student" }) 
                <label for="Student"><span class="button"></span> <span class="text">Student (Higher Education projects)</span></label>

                <label for="entryTitle" class="strong">TITLE OF ENTRY</label>
                @Html.TextBoxFor(m => m.entryTitle)

                <label for="entryDesc" class="strong">ENTRY DESCRIPTION <span class="small">(200 characters or less)</span></label>
                @Html.TextAreaFor(m => m.entryDesc)
            </div>
    }

МОДЕЛЬ

    [Key]
    public int ID { get; set; }

    [Required(ErrorMessage = "Please enter a submission category.")]
    public string submissionCategory { get; set; }

    [Required(ErrorMessage = "Please enter an entry title.")]
    public string entryTitle { get; set; }

    [Required(ErrorMessage = "Please enter an entry description.")]
    public string entryDesc { get; set; }

0 ответов

Другие вопросы по тегам