Toggling sections on/off moves them down the page

  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 54
  • Thank you received: 1

baileynp replied the topic: Toggling sections on/off moves them down the page

Hi Mihaela

I've added the code and tested it, and now after clicking on a 'Listening' option, the section disappears and the Reading section doesn't appear. :)

Regards

Nigel
#235887
  • Posts: 2461
  • Karma: 86
  • Thank you received: 333

mihaela replied the topic: Toggling sections on/off moves them down the page

Hello,

That must be due to the type of section that you are using.

I've tested this on All in a row Fieldset section.

I have attached the package with a form, zipped it attached to this post so you can see that in this case, it is working fine.

In your case this targets the parent page, page 2 so that is the reason why nothing is displayed. Please try to remove one and two "parent()" in:
jQuery("[name=\"ff_nm_optListening[]\"]").parent().parent().parent().parent().parent().parent().parent().parent().css('display','none');
and see whether it appears.

Let me know the result.

Regards,

Mihaela
#235898
Attachments:
  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 54
  • Thank you received: 1

baileynp replied the topic: Toggling sections on/off moves them down the page

Hi Mihaela

Removing parents (that makes me sound like a serial killer :P) did the trick and now all is ok. :)

Just one final question. My form is contained in a module displayed within the website page. When I move from form page to form page, how do I go to the top of the module, i.e. the form, and not the actual page? I know I've seen some type of scroll function on my travels around the forums, but I'm not sure if that's what I should be looking at.

Regards and thanks again

Nigel
#235901
  • Posts: 2461
  • Karma: 86
  • Thank you received: 333

mihaela replied the topic: Toggling sections on/off moves them down the page

Hello again,

Haha, that does sound a bit scary. I'm glad that it is now working properly.

To make the page scroll to the form do as follows.

On the second page of the form, go to Advanced properties of radio group in your form and in the Initscript section set Type to Custom and check the "Page Entry" checkbox.
Then in the code area below put the following code:
function ff_elementname_init(element, condition)
{
jQuery("html, body").animate({ scrollTop:
jQuery('#ff_formdiv4').offset().top }, 1000);
} // ff_elementname_init

NOTE: In the code above replace "elementname" with the Name of that element(radio group) for which you are writing the script.
Also, replace 4 in ff_formdiv4 with the Script ID of your form which you can find in BreezingForms > Manage Records.

Repeat the procedure for the following form pages as well.

Let me know whether it worked as you wanted.

Regards,

Mihaela
#235903
The following user(s) said Thank You: baileynp
  • baileynp
  • Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 54
  • Thank you received: 1

baileynp replied the topic: Toggling sections on/off moves them down the page

Thank you sooo much Mihaela - that's perfect.

Call closed. :)
#235910
  • Posts: 2461
  • Karma: 86
  • Thank you received: 333

mihaela replied the topic: Toggling sections on/off moves them down the page

Hello again,

I'm glad I've helped and that this is working as you wanted. :)

Best regards,

Mihaela
#235980
Moderators: ForumSupporttomeperica
Time to create page: 0.071 seconds

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

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

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here