Active
Project:
Clientside Validation
Version:
7.x-1.x-dev
Component:
Form Validation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 10:07 UTC
Updated:
18 Mar 2013 at 13:09 UTC
I'd like to show errors after input on blur event, and a summary of all events on top of the form on submit.
Is it possible to do this and, if not, do you consider this could be planned for future release ?
Comments
Comment #1
attiks commentedYou can always define a custom javascript callback and use the code to place the error messages where you want.
Comment #2
MarcElbichon commentedyes, but how to know which event is triggered and hwn can i call standard placement ?
Comment #3
attiks commentedOption 1
You can listen to clientsideValidationFormHasErrors to detect the submit, it passes the form, see http://drupalcode.org/project/clientside_validation.git/blob/refs/heads/...
If you need the validator as well, you probably have to patch line http://drupalcode.org/project/clientside_validation.git/blob/refs/heads/... and pass the validator
If you have to validator you can call validator.errorMap, it wil give you a list of all errors.
Option 2
Inside your custom callback you can do something like
error.appendTo(element);
error.appenTo($('#my-error-list'))
But you'll need a way to remove an error message after the input is valid
Comment #4
MarcElbichon commentedOK, will try your solutions.
Many thanks for your help.