Buy Now
Sign in

Multipage form how to scroll to next page?

deltafidesign , March 15 at 16:52
D
deltafidesign 214
March 15 at 16:52 #384879
Is there a way to let page auto-scroll till the position of the form after being redirected to the next steps of a multipage form?
I have a multipage form displayed at the bottom of a long page so when I click on the next step the form redirects me to the next step page correctly but it sets me to the top of the page and user cannot see that the form is lower. So I would axpect that the page will auto scroll till the form section.
Is there a way to do it?
Thanks in advance.
healyhatman 6.1
March 15 at 22:44 #384892
Put an anchor link at the end of the url #idofthrelementyouwanttoscrollto I'm out right now so you might need a bit of a Google.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
GreyHead 63.5
March 16 at 10:39 #384897
Hi deltafidesing,
You could also try using Ajax submit (provided that there are no file uploads) or showing the form in a pop-up module.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
deltafidesign 214
March 16 at 15:15 #384912
@healyhatman where should I assing the ID? I already tryed to assign the form ID to the submit event, example: page3#myformid but it doesn't work correctly in the URL because "#" symbol is not rendered as "#" but as %etc...
@GreyHead those solutions are not my case, already tested before but not possible for some reasons (too long to explain here)
I've found a solution using jquery, but I'm not sure this is the best way to do this. Anyway if this is can be the only solution and can be helpull for other people, here it is:
In Setup tab -> Page tab -> add e custom code with this code inside:
<script>
jQuery(document).ready(function($){
$('html, body').animate({
scrollTop: $("#myid").offset().top
},10);
});
</script>
I've used 10milliseconds just to avoid some possible scenarios conflicts, not sure about this anyway.
Any other better solution than this one?
Also, why not implementing this feature (auto-scroll) in next ChronoForms releases?