How to fix problems with Jquery Validate and dynamically generated forms - Digital Tool Factory blog How to fix problems with Jquery Validate and dynamically generated forms - Digital Tool Factory blog

How to fix problems with Jquery Validate and dynamically generated forms

I recently came across the problem of validating dynamically generated forms with the jquery.validate plugin – everything worked well with the original form, but when there were multiple forms available I got peculiar syntax errors. A quick googling told me to simply add the following code

$(“form”).validate();

to the javascript and everything would be fine. I tried that to no avail. Then I read things more closely and realized that I needed to specify which form I wanted to validate, I changed the code to

$(“#editForm”).validate();

And voila! Problem so.

 

Written By Steve French

 

Leave a Reply

Your email address will not be published. Required fields are marked *






Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.