Added on: Wednesday 14th September 2011
Our CMS includes a form builder that allows users to add contact forms, surveys etc to their websites.
The form builder generates the html to go on the page and users the jquery validate and metadata plugins to do the validation.
The validate plugin works by running the validate() function on a form element when the page loads. for example:
$("#form").validate();
Now as it happens, the form builder creates the 'form id' from the name of the form as defined by the user - after stripping out illegal characters of course.
I spent hours trying to find out why the javascript validation on this particular form wasn't working and eventually traced it to the fact the the 'form id' contained ( and ) characters.
The form builder wasn't stripping these out and there was no error in the browser - I guess jQuery just wasn't finding the element at all.
I've altered the form builder now but just thought this might be useful for anyone else having problems.
Andrew Parrott runs Round Ash Associates, a web design and development company based in Chagford on Dartmoor, Devon.
If you prefer updates via email then please enter your email address below and click Submit.
If you haven't been to Chagford before then take a look a what you are missing.
Sitepoint is an indespensible resource for web designers.
Internet Explorer isn't the only web browser and from a development point of view Firefox is much better.
As many of the articles on this site are slightly techy I thought I ought to link to a glossary of Internet terms.
The layout for this site uses one of Matthew James Taylors 'liquid layouts'.
©Round Ash Associates 2009. Powered by form2list.