TOPIC:

Scroll to form on thankyou page 3 months 2 weeks ago #240286

  • Topic Author
  • gkukovacec
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 19
  • Thanks: 0
Hi, is there a way to scroll to form on thankyou? It loads top of the page.

Tried this in Submit pieces - End Submit but it gives an error:
function ff_formname_submitted(status, message){if(status==0){ff_switchpage(2);
jQuery('html,body').animate({
                scrollTop: 9999
            }, 900);
}else{alert(message);}}

The error is:
SYNTAX ERROR, UNEXPECTED ',', EXPECTING VARIABLE (T_VARIABLE)

Thanks,
G

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

Scroll to form on thankyou page 3 months 2 weeks ago #240293

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

that should go to the Scripts section in the advanced option, not Pieces.
Pieces are basically PHP, while the code for scrolling is javascript.

Make sure to set the Piece back to "none" after you removed the code there.

When you paste the code then in the custom submitted script section, please replace "formname" in the function name with the actual name (not title) of your form.

For example:
function ff_MYSUPERFORM_submitted(status, message){if(status==0){ff_switchpage(2);
jQuery('html,body').animate({
                scrollTop: 9999
            }, 900);
}else{alert(message);}}

Please let me know how it went.

Regards,
Markus

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

Last edit: Post by TheMuffinMan.

Scroll to form on thankyou page 3 weeks 4 days ago #245124

  • LorenzoC
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 21
  • Thanks: 0
Dear Markus,
thanks for the script. I just noticed that it only works from desktop and not on mobile. Is there a workaround for it?

Kind regards
Lorenzo

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

Scroll to form on thankyou page 3 weeks 3 days ago #245164

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
hm, is that happening on ios/safari?

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

Scroll to form on thankyou page 3 weeks 3 days ago #245167

  • LorenzoC
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 21
  • Thanks: 0
Hi, I tested in on an Android Smartphone (Xiaomi A2), but the issue happens on pc too, if you shrink the browser window to emulate the resolution of a Smartphone.

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

Scroll to form on thankyou page 3 weeks 3 days ago #245177

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
can you please try it like this?
jQuery(document).ready(function(){
    jQuery('html,body').animate({
                scrollTop: 9999
    }, 900);
});

or
setTimeout(function(){
    jQuery('html,body').animate({
                scrollTop: 9999
    }, 900);
}, 100);

Regards,
Markus

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

Massive discounts on all subscriptions!

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!