Don't scroll to top on Form Submit

  • 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,

Yes that makes the form scroll to the bottom. Thanks. However when I make any other changes to the form and click the main Save button (see attached), the script reverts to the original code.

I need to be able to press the main save button and be able to have the new script code stay there.

Thanks,

Mark
#163459
Attachments:
  • 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,

Since testing this script once before replying to your post it hasn't worked. I'm not sure why it did work and now it doesn't. I have had to paste the script back in each time I make changes to the main settings of the form, but from what I can see, when I do this, the script looks the same as when you entered it. Can you please have a look at this again?

Thanks,

Mark

This message contains confidential information



PHP 5.6.16
Joomla 3.4.8
BreezingForms - Comp 1.8.7
BreezingForms - Module 1.8.4
BreezingForms - Plugin 1.8
#164053
  • Posts: 15273
  • Karma: 287
  • Thank you received: 1074

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

Hello Mark,

this is "normal" because when you save the form at the form main page and it sees the Thank You Page option enabled, then generates the code again, deleting the current one with the scrollTo. A simple and lazy answer: change that code after you created all your form elements. But as we are not lazy guys, i did a trick entering the code in another way into the Initialization Script (Custom):
<?php
if( JRequest::getVar("ff_form_submitted", 0) == 1 ){
echo '

   jQuery(document).ready(function(){
      self.scrollTo(0,800);
   });
';
}
?>

function ff_test_uploads_init()
{
} // ff_test_uploads_init

it looks a bit weird but works ;)

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#164081
  • 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,

Many thanks for the init script. This works nicely on the front and backend.

Regards,

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

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

Great!

Let us know if you have further questions.

Regards,
Pedro
=========================================Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
==============================================
#164148
  • Posts: 19
  • Thank you received: 0

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

Hello,

It is also possible to scroll to an anchor?

Regards
Toni
#164504
Moderators: ForumSupport
Time to create page: 0.060 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!