jQuery validation plugin - removing elements
- by d3020
I'm using the jQuery validation plugin. On most of my input type... tags I have class='required'.
When I submit the page, via JavaScript, the controls on the page that have this class are found. However, there are a handful of checkboxes that I don't need to validate.
I've tried removing the class code completely from the input tag, also tried class='cancel', and class='required:false.
When doing any of those things though when the form submits it can't find the checkbox control.
How do I still keep the ability to do Request.Form and find my checkbox object but at the same time when the form submits don't apply validation to this particular control.
Thank you.
Edit here.
This is what I'm using without the "checked" code and ternary operator. In my input tag I'm calling a function like this...
sb.Append(" " + crlf);
Inside that function is where I check for the True or False coming back, like this.
case "chkFlashedCarton":
strResultValue = pst.FlashedCarton.ToString();
if (strResultValue == "True")
{
strResultValue = " checked";
}
break;
strResultValue is what is returned back.
Does this help to see? Thank you.