Hi,
Is it possible to show the error messages in a pop up?
thnks in advance.

CommentFileSizeAuthor
#3 cv_popup.zip1.13 KBJelle_S
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Title: pop up fpr error messages » pop up for error messages
Assigned: Unassigned » Jelle_S

It's possible, but not without coding. I'll ask Jelle_S to have a look at it.

gopisundar’s picture

@attiks
Thanks a lot.

Jelle_S’s picture

FileSize
1.13 KB

This 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):

  • Error message settings:
    • uncheck "Scroll to error message"
  • Error message placement:
    • Default location: Custom function
    • Custom function name: cv_popup_errorplacement

Note that the Custom function name needs to be the name of the function you defined on Drupal.clientsideValidation.prototype.

Jelle_S’s picture

Status: Active » Fixed
gopisundar’s picture

Status: Active » Fixed

@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.

gopisundar’s picture

Status: Fixed » Active
gopisundar’s picture

Status: Fixed » Active

any one?

attiks’s picture

You 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, ...

attiks’s picture

Status: Active » Closed (works as designed)

Closing, if needed feel free to re open.

attiks’s picture

Assigned: Jelle_S » Unassigned

  • Jelle_S committed 956d44b on 7.x-2.x
    Issue #1501976 by gopisundar: Pop up for error messages.
    
    
jetcode’s picture

Version: 7.x-1.x-dev » 7.x-1.41
Issue summary: View changes

Hello, 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.