How do I prevent scrolling to the top of the page after submit form in epi forms?

Vote:
 

Hello,

Could any one help me how to prevent scrolling to the top of the page after submit form in epi forms?

Thanks,

/Katharina

#179962
Jun 27, 2017 11:04
Vote:
 

You need to modify the the FormsContainerBlock.ascx view to add a anchor / bookmark, and also add this is to the forms submit action. This is just standard HTML / broweser functionality - see (https://stackoverflow.com/questions/7983290/is-there-any-way-to-bookmark-or-link-to-a-section-of-a-page-without-an-anchor

For example - add this markup immediately before your form element

<a id="form-<%: Model.Form.FormGuid %>"></a>   

and change the form action to the below.

<form method="post" action="#form-<%: Model.Form.FormGuid %>"

This will causes the browser to scroll to the anchor element you added, when the form is submitted (this assumes BTW you aren't posting asynchronously using javascript)

#179964
Jun 27, 2017 12:14
Vote:
 

Hello Mark!

Thank you so much. Its work perfect!! Thump you up! smile

Regards,

/Katharina

#179966
Jun 27, 2017 13:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.