Error Message Pop Up

Is it possible that when their is an error state upon submission (such as a required field missing) that the error message pops up on the screen? Currently if the submit button is down a page then the error message is not seen with no other clues given, leaving users just constantly clicking the submit button if they dont scroll back up.

Here's my slight tweak of Bob's code.   This formulation works for all scenes and speeds up the scroll.  :-)

However, I can't get it to work for login pages! :-(  Anyone have an idea how this scroll to the top could work so that when a user makes a password error they are scrolled to the top to see the error?

 


//Scroll to kn-message element if any errors on a form submission. Works for all scenes!

$(document).on('knack-view-render.any', function(event, page) {
$("button.kn-button.is-primary").on("click", function(){
setTimeout(function(){
if ($(".kn-message").is(":visible")) {
$('html, body').animate({
scrollTop: $("#knack-body").offset().top
}, 500);
}
else {
notVisible = 1;
}
}, 500);
});
});