I am using jQuery Wizard plugin and validating using the jQuery Validate plugin – developing in CakePHP 2.1
The jQuery wizard/validation.
It is supposed to be set up like this:
$(function(){
$("#JobAdCreateForm").formwizard({
historyEnabled : true,
validationEnabled: true,
focusFirstInput : true,
outDuration : 100,
validationOptions : {
rules: {
JobAdJobTitle: "required",
JobAdCategoryId: "required"
},
messages: {
JobAdJobTitle: "Please enter a job title.",
JobAdCategoryId: "Please select a category.",
}
}
});
});
In CakePHP the name attribute of the field looks like this:
data[JobAd][job_title] now that gives an error when I change the name attribute above to data[JobAd][job_title]. It would have worked perfect if the jquery.validate used the id attribute instead of the name atribute.
Any ideas on how I can solve this?
What about if you quote the name attribute?