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.
Hi,
Is it possible to show the error messages in a pop up?
thnks in advance.
Comment | File | Size | Author |
---|---|---|---|
#3 | cv_popup.zip | 1.13 KB | Jelle_S |
Comments
Comment #1
attiks CreditAttribution: attiks commentedIt's possible, but not without coding. I'll ask Jelle_S to have a look at it.
Comment #2
gopisundar CreditAttribution: gopisundar commented@attiks
Thanks a lot.
Comment #3
Jelle_SThis is now possible in the latest dev version.
Attached is an example of how you would do this.
Your settings in admin/config/validation/clientside_validation should be like this (if you use the example module that is attached):
Note that the Custom function name needs to be the name of the function you defined on Drupal.clientsideValidation.prototype.
Comment #4
Jelle_SComment #5
gopisundar CreditAttribution: gopisundar commented@Jelle_S
Hi thanks a lot for replying and giving solution within this short period after posting this issue. But i am not able get this done. I downloaded the latest version of clientside validation(released 26 march 7.x.1.x-dev). i installed and enabled along with the cv_popup what u attached. after installing this i got clientside validation popup check box along with other options. i enabled these things. i went to configuration and unchecked the "scroll to error message". i got error message placement option. In that i chose the custom function. and in the custom function field i gave "cv_popup_errorplacement" as value saved the configuration. I added validation(minimum length) and checked in the webform i didnt got any popup message. The error message is not displayed and only the particular field is shown in red color.Do i need to enable any other thing. please guide me in this.
thanks in advance.
Comment #6
gopisundar CreditAttribution: gopisundar commentedComment #7
gopisundar CreditAttribution: gopisundar commentedany one?
Comment #8
attiks CreditAttribution: attiks commentedYou need to alter the code inside cv_popup_errorplacement to create the popup; this is just an example on how you can do it. There will be now popup support out of the box, since it all depends on what you use for the popups: jquery dialog, modalform, colorbox, ...
Comment #9
attiks CreditAttribution: attiks commentedClosing, if needed feel free to re open.
Comment #10
attiks CreditAttribution: attiks commentedComment #12
jetcode CreditAttribution: jetcode commentedHello, I am trying to make this working but I have a problem I don't know how to solve.
I have a working custom errorplacement function. But when I try to display a dialog box, the box is displayed and then the page reloads automatically and finally all errors appears in the regular "messages error" div above the webform.
How can I prevent this ? I don't want to reload the page until the user clicks OK or close it and I want these errors to be displayed inside the dialog box instead of that div. I tried the code committed here and it is the same behavior.
Thank you for your help, I'm beginner in jquery.
J.