Forum

Thread tagged as: Question, Problem, Forms

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?

Simon Clay

Simon Clay 127 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

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.

Simon Clay

Simon Clay 127 points

action="#footer"

Worked great for me. Thanks.