This will probably turn into multiple questions as I work my way through it but I'm in need of some serious jQuery help. I've created a multi-part form based on the example at bassistance.de. In that demo, the validation is fairly simple - designating required fields with a class, iterating through and pulling error messages from the form element title attributes.
My form is more complex than the demo - and I'm in over my head with implementing the validation in this instance. For example, in the demo, the errors are coming right after the form element. In my case, I want to designate the fields I want validate, create the rules and specify where I want to put errors with a class depending on whether they are errors or not. I'm using the Blueprint CSS framework and it already has classes built for such things but, as I said, I can't figure out how to make that work.
Ideally, I'd like to be able to change the validation method in the demo as well and substitute one that I'm more familiar with - like:
$("#theForm").validate({
errorPlacement: function(error, element) {
if(element.attr("name") === "name") {
error.appendTo("#nameError");
}
},
groups: {
capacityGroup: "progMin progMax",
},
rules: {
fName: "required",
},
messages: {
fName: "*First Name is required",
}
});
So, I surely hope someone can help with this. I've uploaded a slightly different demo at www.43rdworld.com/multitest.htm with an added div for error messages and the stylesheet. I'd really like to change the way the form is validated so that it will still validate from page to page before being submitted but let me specify the required fields, write my own rules and messages and specify where those messages will display.