Hi everybody. I'm using 7.1.34 version of this module.

I'm trying to work with Error message placement option in Default Settings of module.I have disabled scroll message option and I want to use Custom function selector but, I can't see in default settings UI a field to put the name of the javascript function that is related with javascript code (like I see in clientsidevalidation.api.js with 'mycustomerrorplacement' :

Drupal.clientsideValidation.prototype.mycustomerrorplacement = function (error, element) {
        // error placement code here.
      }

)

How can I put this field or relat it with javascript code?? Because now if I put this code in my javascript validation I get an Uncaught TypeError: Cannot read property 'prototype' of undefined error in my browser console.
Thanks

Files: 
CommentFileSizeAuthor
#2 capture_client.JPG31.62 KBdrupso
#1 Selection_019.png28.55 KBJelle_S

Comments

Component:User interface» Documentation
StatusFileSize
new28.55 KB

Hi,

From clientsidevalidation.api.js:

The declaration of this function needs to be within the attach of a Drupal behavior.

Also,
can you make sure your javascript file is loaded after clientside_validation.js? Otherwise Drupal.clientsideValidation doesn't exist yet, which would explain the error you are getting.

You can find the field to enter the name of the function at
admin/config/validation/clientside_validation/default
in the Error message placement fieldset:

Selection_019.png

StatusFileSize
new31.62 KB

Oh the problem must be in default settings ui cause I can not see "Custom function name" field as you can see in attach file.
I'm using 7.1.34 version, It's possible that this option is only in dev version??

Thanks for your help!!!

That's strange. It should be there. My guess is that you have a javascript error on that page. We use javascript to hide that field unless 'Custom function' is selected. The javascript error is preventing that field from showing up.

I don't see any error on browser console. Something is blocking this field then but what?. I'll keep on investiganting which can cause it.

For now, as a workaround, you can unhide the field useing somthing like firebug, then you can enter a value and see if the error placement function works.

Still weird the field doesn't show up. I really expected a js error to be the cause of this. (Btw, because of the way overlay works, sometimes the errors don't bubble up all the way to your console. Try disabling the overlay module and see if you see any errors in your console afterwards.)

Disabling display: none with Firebug, it works.
Seeing documentation, there is a bug with fieldset and #states structures in older versions in D7 (Version I used was 7.8)

Thanks for your help
Regards

Status:Active» Closed (fixed)

Issue summary:View changes

1