Skip to content
Advertisement

Automatically scroll down after submit action

How to make my website automatically scroll down after sending e-mail from “Contact Form” which is located on the bottom of my webpage? Information about successful sending or error ouccurs below the form and after clicking that ‘submit’ button page is refreshing and user can see only top of the site, not the bottom…

Advertisement

Answer

<form id="form" action="{your_action}#form">
....
</form>

or if you want scroll to alert position :

<div id="form">
  <div class="alert">Alert</div>
  <form action="{your_action}#form">
  ...
  </form>
</div>
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement