Is it possible in Validator plugin for prototypejs to put error-messages in certain div.class ?
I’ve tried
new Validation('.form-class', { containerClassName : '.other_div' })
but without any effect. Any ideas? Thx.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It doesn’t look like the supplied validation allows for user-defined class names but it does use some predefined class names (see the “CSS Hooks” section).
A quick look at the source shows this:
So you can create some DIV elements in advance with an ID which the script will find and use. So if the password field is called
passwordyou can prepare an element like this:If that’s still not enough there is another possibility. Copy the
/js/prototype/validation.jsfile to your theme’sjsfolder (so the original remains intact) then in one of your theme’s layout XML files do something like this:You are now free to modify the script however you want.