I have made a custom form for my Umbraco 7 site using the SurfaceController approach. But the thing is, my partial is located a bit down on the page and after the HandleFormSubmit and RedirectToCurrentUmbracoPage in the SurfaceController, the browser always scrolls to the top of the page, leaving the form out of view.
Does anyone have a nice trick, maybe some js that I can put in the partial which makes sure the scroll position is retained after submitting the form?
Maintain scroll position after HandleFormSubmit
I have made a custom form for my Umbraco 7 site using the SurfaceController approach. But the thing is, my partial is located a bit down on the page and after the HandleFormSubmit and RedirectToCurrentUmbracoPage in the SurfaceController, the browser always scrolls to the top of the page, leaving the form out of view.
Does anyone have a nice trick, maybe some js that I can put in the partial which makes sure the scroll position is retained after submitting the form?
Bendik,
I did with setting a value in controller then in partial testing for that and writing out some js so in my base template i had:
Regards
Ismail
is working on a reply...