Forums

Adjust Validation Message Autoscroll

kko 27 Jun, 2014
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.
Max_admin 28 Jun, 2014
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
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kko 30 Jun, 2014
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.
Max_admin 02 Jul, 2014
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
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
groovezog 02 May, 2015
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:

$this.focus();

...and change it to:

$(window).scrollTop($this.offset().top - 200);
$this.focus();
Max_admin 11 May, 2015
@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
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
bepos 13 May, 2015
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
Max_admin 17 May, 2015
Some users have asked for this to be added!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
bepos 17 May, 2015
Okay. Sorry didn't realize that. Is an option possible to disable/enable the option?

kind regards
This topic is locked and no more replies can be posted.