Forum
Perch Forms - jumping to top of page when 'Submit' is clicked
I have a form in the footer of the webpage. When the form is filled out and 'Submit' is clicked the form sends (or validates) and the page is reloaded, jumping to the top.
Therefore the user can't see the success message (or validation errors) unless they scroll back to the bottom of the page.
Ordinarily on a form you could add an id to the action of a form to jump back to the form after 'Submit' is clicked:
<form action="formscript.php#form-anchor" id="form-anchor">
</form>
But Perch Forms doesn't use 'action', it uses app="perch_forms">
How can I get it to focus back on the form after 'Submit' is clicked?
You can add an action. Be aware though that the form ID will be prefixed to prevent clashes, so you might want to target an item close to it.
Worked great for me. Thanks.