I have a form in an mvc application.
If validation is triggered it disables every other button on the screen.
I would like to allow the user to navigate away from the page where the form is, but I don't know how to do that.
I tried to remove the validation itself, by commenting out the part of my code -on the controller - which validates the model but to no avail; i mean 'generally' this one:
if (ModelState.IsValid)
{
}else
{
return viewmodel;
}
I wonder how to prevent the form validation from disabling every other button the page when it is triggered.
Many thanks.
You can add class="cancel" to the buttons you do not want to be disabled, here is how JQuery.Validate selects the buttons: