I have a form with inline fields.
i want the error to appear above the field, but only one message at a time (otherwise they show on top of each other...unless i give a specific position to each message.
I think it will be nice if on blur the relevant message will appear, and hide the others..
also it would be nice if i can override the error label html...
the module can responde to blur/focus but you need to provide a custom js to display the message you want and hide the others, i don't see a generic solution that can be added to the module, but i'm open for suggestions.
@ramsegal this isn't going to be easy since there's no easy way to detect which field is the active one. What might be possible is to add your own handlers to blur/focus and call the validate on a single element.
this setting has been added in the latest dev version, it only works if you display the error messages on top of the form though. It's quite buggy when the error messages are displayed inline.
Comments
Comment #1
ramsegal commentedexample - email
Comment #2
ramsegal commentedoops i wanted to create a new issue, instead put this comment on the wrong place
Comment #3
attiks commentedIf I understand you want some messages displayed at the top and some of them inline?
Comment #4
ramsegal commentedI have a form with inline fields.
i want the error to appear above the field, but only one message at a time (otherwise they show on top of each other...unless i give a specific position to each message.
I think it will be nice if on blur the relevant message will appear, and hide the others..
also it would be nice if i can override the error label html...
Comment #5
attiks commentedthe module can responde to blur/focus but you need to provide a custom js to display the message you want and hide the others, i don't see a generic solution that can be added to the module, but i'm open for suggestions.
Comment #6
ramsegal commentedcan you provide an example js?
thanks!
Comment #7
attiks commentedComment #8
attiks commentedchanging title
Comment #9
attiks commented@ramsegal this isn't going to be easy since there's no easy way to detect which field is the active one. What might be possible is to add your own handlers to blur/focus and call the validate on a single element.
If I find a better way, I'll let you know.
Comment #10
ramsegal commentedMy current solution is this:
So the last error message is displayed only..
Comment #11
attiks commentedjquery.validate has an option showErrors (http://docs.jquery.com/Plugins/Validation/validate#options) that might be able to solve this, but it isn't implemented inside our module.
Comment #12
ramsegal commentedfeature request? :)
Comment #13
attiks commentedI'll have a look at it one of these days
Comment #14
jelle_sthis setting has been added in the latest dev version, it only works if you display the error messages on top of the form though. It's quite buggy when the error messages are displayed inline.
Comment #15
jelle_sThis setting will now only be applied when the display error message is set to 'top of form'
Comment #17
ramsegal commentedIs there a way to support this setting not only for top of form?
Thanks