Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Long form, scroll to error? #99

Open
sporkman opened this issue Nov 4, 2015 · 1 comment
Open

Long form, scroll to error? #99

sporkman opened this issue Nov 4, 2015 · 1 comment

Comments

@sporkman
Copy link

sporkman commented Nov 4, 2015

I'm very much a JS noob. I have the validation working, and I love the idea of this project - basically make the browser act like it truly supports html5 validation. :)

I have a very long form, that even on an iPad has form items out of view when hitting "submit". Is there a simple way to have the browser scroll up to where the first error exists?

@ericelliott
Copy link
Owner

Sure. You can listen for the formValidated event and scroll to the first element with an error. There is a jQuery plugin that will let you scroll to a selected element.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants