• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Pagebreak - After Loading Next Page, Scroll to Top

Pagebreak - After Loading Next Page, Scroll to Top 14 years 6 months ago #11625

  • wbaccus
  • wbaccus's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 1
Love the new Pagebreak feature. I have some really long forms and this makes them more palatable.

Is there a way using Javascript to have the page scroll back to the top of the form after you use a Pagebreak button? It's disorienting for the user to have to manually find the top of the form on each page.
The administrator has disabled public write access.

Re:Pagebreak - After Loading Next Page, Scroll to Top 14 years 6 months ago #11663

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 745
  • Thank you received: 66
Hello,

In order to achieve this please try going to components\com_rsform\assets\js and edit the pages.js file. Just search for :

thePage.style.display = '';

and add the following line after it:

scroll(0,0);
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: coach4

Re:Pagebreak - After Loading Next Page, Scroll to Top 13 years 7 months ago #14653

  • bowner
  • bowner's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Thank you received: 6
Here, I think, is much better solution:
[url=http://]http://www.rsjoomla.com/support/documentation/view-article/554-when-moving-to-the-next-page-of-a-form-i-want-the-screen-to-be-scrolled-up.html[/url]

Go to Components > RSForm!Pro > Manage forms > select your form > CSS and Javascript tab and add a new function that will be used in order to change pages:
<script type="text/javascript">
function rsfp_changePageScroll(param1, param2, param3, param4)
{
rsfp_changePage(param1, param2, param3, param4);
scroll(0,0);
}
</script>

This function will use the default function that is used by RSForm!Pro to navigate from one page to another(rsfp_changePage) and after the page is changed will scroll to the top of the page. After you have made these modifications you will need to add a simple script in "Scripts called on form display" that changes the default function used in order to navigate your form with your new function:
$formLayout = str_replace('rsfp_changePage','rsfp_changePageScroll',$formLayout);
The administrator has disabled public write access.
The following user(s) said Thank You: stephen.van.russelt, jami, CAPPS, andrewpanckhurstNZ, john119, mi0

Re:Pagebreak - After Loading Next Page, Scroll to Top 7 years 8 months ago #37223

  • john119
  • john119's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Thanks bowner, this worked perfectly!!

Quick question, what would need to be done to make it smooth scroll back to top?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!