Scroll to first error
Closed this issue · 2 comments
adelacreative commented
How can we scroll to the first error the form finds? If the form is big and error is at top, it's not visible.
tcdurks commented
i'm using this inside handleFormSubmit()
if(errors){
$('html, body').animate({
scrollTop: $('.your-error-class').offset().top -100
}, 1000);
}
adelacreative commented
Thank you very much, this is exactly what I needed!