Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:12:40+00:00 2026-06-11T17:12:40+00:00

I have a form in an ASP.Net MVC project on which I am using

  • 0

I have a form in an ASP.Net MVC project on which I am using qTip2 to display validation erros. On that form, I also have text fields that are activated/deacivated depending on choices made with radio buttons. When fields are not to be used, I set their disabled=”disabled” properties. This ensures that client side validation (jQuery unobtrusive validation) for these fields is also deactivated. Now, I am wondering how to reset the qTip2 “bubbles” for fields that get disabled.

Let’s say I have radio buttons 1 and 2 that enable text boxes A and B respectively. Let’s also say that radio button 1 is selected by default, and that text boxes A and B are required fields when the corresponding radio button is selected. If I press on the Submit button without filling any text field, a qTip error bubble appears beside text box A. Now, if I press on radio button 2, I have to clear that bubble, disable text box A and its validation, and enable text box B and its validation. However, if I press submit at this point without filling text box B, no error bubble appears and the form is not getting submitted.

I tried various combinations of the following commands to accomplish this, but then the validation errors get completely disabled:

$('.qtip').remove();
$('.qtip').hide();
$("input.input-validation-error").removeClass("input-validation-error"); // watch out for the error message labels or they won't go away
$('form').data('validator').resetForm();
$("form").validate().form();

No matter what combinations of these commands I execute after a radio button got clicked and the proper text-boxes disabled/enabled, the qTip bubbles disappear, but they never reappear even if I click on the Submit button and other errors should appear on the form.

I am probably not using the right commands to reset qTip validation bubbles.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:12:41+00:00Added an answer on June 11, 2026 at 5:12 pm

    Ok, I found a solution right after posting the question. I used the solution proposed on this page http://johnculviner.com/?tag=/unobtrusive-validation-reset that I modified a bit. I added the following line: $form.find(‘input’).qtip(‘destroy’);

    It gives this:

    //Taken from: http://johnculviner.com/?tag=/unobtrusive-validation-reset
    (function ($) {
        $.fn.resetValidation = function () {
            var $form = this.closest('form');
    
            //Destroy qTip error bubbles (http://craigsworks.com/projects/forums/thread-using-qtip-with-jquery-validation-framework)
            //$form.find('input:not(.errormessage)').qtip('destroy');
            $form.find('input').qtip('destroy');
    
            //reset jQuery Validate's internals
            $form.validate().resetForm();
    
            //reset unobtrusive validation summary, if it exists
            $form.find("[data-valmsg-summary=true]")
                .removeClass("validation-summary-errors")
                .addClass("validation-summary-valid")
                .find("ul").empty();
    
            //reset unobtrusive field level, if it exists
            $form.find("[data-valmsg-replace]")
                .removeClass("field-validation-error")
                .addClass("field-validation-valid")
                .empty();
    
            return $form;
        };
    
        //reset a form given a jQuery selected form or a child
        //by default validation is also reset
        $.fn.formReset = function (resetValidation) {
            var $form = this.closest('form');
    
            $form[0].reset();
    
            if (resetValidation == undefined || resetValidation) {
                $form.resetValidation();
            }
    
            return $form;
        }
    })(jQuery);
    

    Then when a radio button is clicked, I call $(“form”).resetValidation(); after the proper fields have been enabled/disabled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASP.NET MVC 1.0. I have an ActionResult which receives a form
I have a form in an ASP.NET MVC project which has a select drop
I have a project using asp.net mvc and form membership provider . I have
I have an ASP.NET MVC project with a form. In the Action method that
I have a form that collects a data using ASP.NET MVC. It looks like
I have an ajax form in asp.net mvc which is as simple as this:
I have an ASP.NET MVC form that when submitted can return either an ActionResult
I have an ASP.NET MVC form laid out something like this: @using (Html.BeginForm(null, null,
I have been using telerik extensions for an asp.net mvc project, more specifically the
I have an Asp.Net MVC project with the typical forms authentication that redirects the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.