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
Comment | File | Size | Author |
---|---|---|---|
#2 | capture_client.JPG | 31.62 KB | drupso |
#1 | Selection_019.png | 28.55 KB | Jelle_S |
Comments
Comment #1
Jelle_SHi,
From
clientsidevalidation.api.js
:Also,
can you make sure your javascript file is loaded after
clientside_validation.js
? OtherwiseDrupal.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:Comment #2
drupso CreditAttribution: drupso commentedOh 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!!!
Comment #3
Jelle_SThat'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.
Comment #4
drupso CreditAttribution: drupso commentedI 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.
Comment #5
Jelle_SFor 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.)
Comment #6
drupso CreditAttribution: drupso commentedDisabling 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
Comment #7
drupso CreditAttribution: drupso commentedComment #7.0
drupso CreditAttribution: drupso commented1