TOPIC:

Don't scroll to top on Form Submit 4 years 5 months ago #163186

  • Topic Author
  • mfranken
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 17
  • Thanks: 0
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

Please Log in or Create an account to join the conversation.

Don't scroll to top on Form Submit 4 years 5 months ago #163313

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1075
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);}}

Please Log in or Create an account to join the conversation.

Don't scroll to top on Form Submit 4 years 5 months ago #163374

  • Topic Author
  • mfranken
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 17
  • Thanks: 0
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
Attachments:

Please Log in or Create an account to join the conversation.

Don't scroll to top on Form Submit 4 years 4 months ago #163387

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1075
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.

Please Log in or Create an account to join the conversation.

Don't scroll to top on Form Submit 4 years 4 months ago #163392

  • Topic Author
  • mfranken
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 17
  • Thanks: 0
Here you go:
This message contains confidential information


Thanks,

Mark

Please Log in or Create an account to join the conversation.

Don't scroll to top on Form Submit 4 years 4 months ago #163398

  • pedro81's Avatar
  • pedro81
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 15273
  • Karma: 287
  • Thanks: 1075
Hello Mark,

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

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.054 seconds

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

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!