Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Usefull if you want to display the error message above the field, when some of the fields are on the same line...
Comments
Comment #1
ramsegal CreditAttribution: ramsegal commentedexample - email
Comment #2
ramsegal CreditAttribution: ramsegal commentedoops i wanted to create a new issue, instead put this comment on the wrong place
Comment #3
attiks CreditAttribution: attiks commentedIf I understand you want some messages displayed at the top and some of them inline?
Comment #4
ramsegal CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: ramsegal commentedcan you provide an example js?
thanks!
Comment #7
attiks CreditAttribution: attiks commentedComment #8
attiks CreditAttribution: attiks commentedchanging title
Comment #9
attiks CreditAttribution: 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 CreditAttribution: ramsegal commentedMy current solution is this:
So the last error message is displayed only..
Comment #11
attiks CreditAttribution: 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 CreditAttribution: ramsegal commentedfeature request? :)
Comment #13
attiks CreditAttribution: 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 CreditAttribution: ramsegal commentedIs there a way to support this setting not only for top of form?
Thanks