My site is a one-page site based on the Agency theme. I have a Contact form at the bottom of the page. When you click the Submit button, if any of the field validators fail, it jumps to the top of the page. I’d instead like it to “autofocus” on the Contact form. Otherwise, I’m afraid the user will think their email got submitted when in fact it didn’t. Is there any way to do this?
It might depend on a theme, but if it’s a modular page, maybe you could change form action to the module URL, eg. http://mypage.tld/#form-module
, or maybe implement AJAX form so that it would not reload the page
@jmsstuff If you take a look at the Agency skeleton demo, you will see it jumps to the top of the form after validation.
Then if you take a look on Github at the form used by the contact module, it uses (as @Karmalakas suggested) the following form:
form:
name: contact
action: /home#contact
...etc
Thank you, I was missing that in my markdown. Now it works!