Hi, I have a small issue with the validation tooltip/bubble message. The site I'm working on has a fixed menu header at the top that's about 90px tall. When you try to submit the form before completing the required fields, the page scrolls to the empty field with the validation popup message, which is hidden behind the fixed header. How can I adjust the scroll to accommodate for this header?
Any help is appreciated! Thanks.
Any help is appreciated! Thanks.
This is not going to be easy, the scroll code is inside the validation library!
Maybe you can try to set the validation to display below fields, this can be configured under the "JS Validation" tab after you open your form for editing (click the form name)!
Regards,
Max
Maybe you can try to set the validation to display below fields, this can be configured under the "JS Validation" tab after you open your form for editing (click the form name)!
Regards,
Max
Hi Max,
Thanks for the suggestion. Not sure if maybe I missed something, but when I set the validation to show "After element," the JS validation doesn't work at all and the form submits. Any thoughts on this?
Thanks.
Thanks for the suggestion. Not sure if maybe I missed something, but when I set the validation to show "After element," the JS validation doesn't work at all and the form submits. Any thoughts on this?
Thanks.
No idea why this happens, it should display the error below the field!
You may try to disable the JS validation and use the server side validation instead, its more secure and should work fine in situations where the JS validation is conflicting with other stuff on your page!
1 last suggestion is to install v5, which works fine with v4 on the same site, just give it a try and keep all your v4 forms intact, it has some demo forms, check if they are displayed correctly, if they are then you may rebuild this form only in v5, and keep your other forms in v4.
Regards,
Max
You may try to disable the JS validation and use the server side validation instead, its more secure and should work fine in situations where the JS validation is conflicting with other stuff on your page!
1 last suggestion is to install v5, which works fine with v4 on the same site, just give it a try and keep all your v4 forms intact, it has some demo forms, check if they are displayed correctly, if they are then you may rebuild this form only in v5, and keep your other forms in v4.
Regards,
Max
For CFV5, I solved this problem by adding a line in the file libraries/cegcore/assets/gplugins/gvalidation/gvalidation.js, in the function:
$.fn.show_gvalidate_error
...near line 465.
Look for:
...and change it to:
$.fn.show_gvalidate_error
...near line 465.
Look for:
$this.focus();
...and change it to:
$(window).scrollTop($this.offset().top - 200);
$this.focus();
@groovezog, Thank you for sharing this! are you sure that you have the latest update installed ? a scroll effect has already been added in v5
Regards,
Max
Regards,
Max
It would be nice to just disable the scroll effect. i guess it has no use at all.
i just commented out the line to disable it.
Regards,
Mark
i just commented out the line to disable it.
Regards,
Mark
Some users have asked for this to be added!
This topic is locked and no more replies can be posted.