Friday, July 8, 2011

Uncaught TypeError: Cannot read property 'form' of undefined

In my code, that JavaScript error was caused by missing "name" attribute of an "input" tag, having jQuery.validation class "required".

For example:

input class="required" id="agree" type="checkbox" value="yes"
produces the error

input class="required" id="agree" type="checkbox" value="yes" name="agree"
works fine