Don't scroll to top on Form Submit

  • mfranken
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 0

mfranken created the topic: Don't scroll to top on Form Submit

Hi,

I have a Joomla page where you need to scroll the page down a page worth to see the start of a form (form is added to end of article). The form is a single page, then displays a confirmation on the second page.

All works fine apart from when I press 'Submit Form' the page re-loads and scrolls to the top of the page, so I don't see the confirmation from the form. Is there a way to stop the 'Submit Form' from scrolling to the top of the page? Or make it scroll to the bottom of the page?

I've looked at the 'Manage Scripts' admin page and tried doing the following to the 'Next page', Previous page', 'Validate and next page' and 'Validate previous page':

- remove the line 'self.scrollTo(0,0);'
- change 'self.scrollTo(0,0);' to 'self.scrollTo(0,1000);'

Neither of these seemed to help.

Thanks in advance,

Mark
#163186
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Don't scroll to top on Form Submit

Hello Mark,

try this solution:
go to your form > Advanced > more options > Scripts > Submitted Scripts. As you have a Thank You Page, there you should have a code like this:
function ff_formName_submitted(status, message){if(status==0){ff_switchpage(2);}else{alert(message);}}

add there a code line like this and test your form again.
function ff_formName_submitted(status, message){if(status==0){ff_switchpage(2);
self.scrollTo(0,800);
}else{alert(message);}}

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#163313
  • mfranken
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 0

mfranken replied the topic: Don't scroll to top on Form Submit

Hi Pedro,

I see the scripts page and the existing code. I replaced this code with your new code and click save on the scripts page. I then try the front end but there is no change. So I click back to Manage Forms, select my form and click the main Save button top left. When I navigate back to the form scripts page the code is back how it used to be.

I've tried several times to enter this new script code but every time I click the main save button, the script reverts back to how it used to be. If I don't click the main save button, just the script page save button it updates but no change is made to the front end when I enter a form. However, at some stage I will need to click the main save button, and then the script change is lost.

Any ideas?

Mark

Joomla 3.4.8
Breezing Forms Component 1.8.7 Stable 883
Breezing Forms Module 1.8.4
Breezing Forms Plugin 1.8
PHP 5.6.16
#163374
Attachments:
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Don't scroll to top on Form Submit

Hi Mark, can you give us your backend credentials(Super User) so we can do a test. You can put your credentials into this tags:
[confidential]
//your URL and credentials
[/confidential]

Then only the admins will able to see this info.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#163387
  • mfranken
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 0

mfranken replied the topic: Don't scroll to top on Form Submit

Here you go:
This message contains confidential information


Thanks,

Mark
#163392
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

pedro81 replied the topic: Don't scroll to top on Form Submit

Hello Mark,

could you test your form now? let us know if the scrollTo is working at your frontend.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#163398
Moderators: ForumSupport
Time to create page: 0.058 seconds

We Are Doing Our Part

Massive discounts on all of our extension subscription plans to help you and your business in these times.

Get Your Subscription Here

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

We are doing our part and support your business with extremely low prices -- For example 6-Months-Subscription for only $9 USD. For as long as necessary.

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!