Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

When Form fields aren't valid, page refresh jumps to top of page


Go to End


1681 Views

Avatar
socks

Community Member, 191 Posts

17 February 2010 at 1:07pm

Edited: 17/02/2010 8:46pm

SS 2.3.6
UserDefinedForms

When a form is at the bottom of a long page and the user doesn't properly fill out the fields and then tries to submit the form. The page refreshes and jumps back up to the top of the page and it appears everything is ok unless you scroll back down and see the errors.

What's the best way to overcome this? Can I specify an anchor in the page to jump to when this happens?

I currently have javascript validation turned off in _config.php (it was causing errors with my lightbox). Although I don't see any difference with functionality with it on or off.

EDIT:
Nevermind: Think my Requirements for the javascript files may have been causing some weirdness with the validation. Seems to be working now.