How do I automatically collapse sections either using Onload Technique or a Formula - URL Button

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hello!


I wanted to know the javascript to insert in the .js page for Dan's Onload Technique to default all sections to be collapsed when the form is opened.

I also wanted to know if there was a toggle button I can create to "Collapse All" sections and to "Expand All" when pressed again.

Please let me know!

Thanks in advance
Photo of Rodman91

Rodman91

  • 132 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
I don't think it is a good idea to mess with the internals of QuickBase Dynamic Form Rules. But if you are not using Dynamic Form Rules you could put a series of these statements in your module.js and automatically close the sections that are open by default.

$("#sect_s1Header span:first").trigger("click");
$("#sect_s2Header span:first").trigger("click");
$("#sect_s3Header span:first").trigger("click");

However the next time you revisit the page QuickBase will remember the state you left the sections in and will proceed to toggle them. So maybe my answer will give you a hint at what to do but I do not really suggest you monkey around with the internal state of QuickBase's forms unless you are some type of mad hacker. If you do this your code will surely fail at some point in the future when QuickBase changes their page architecture but since you only do this if you are a mad hacker you will have no problem adopting to the abrupt change. What is really needed is a "contract" or API that would allow you to modify the form / page to enhance its functionality without creating conflict with QuickBase's native functionality.

http://memegen.link/morpheus/don't-modify/quick-base's-state.jpg
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,884 Points 5k badge 2x thumb
Well said :)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
Dan, are you a mad hacker? Just curious where you draw that line.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
Well I am from MoTown but I am a white hat

http://dualcoremusic.com/nerdcore/upload/dual_core-trust_me.mp3
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
Well, given that you have introduced the hat topic, perhaps you are in fact the Mad Hatter? Some aspects of the description do seem to fit, in particular obsessive / compulsive.  http://www.comicvine.com/mad-hatter/4005-5814/images/
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
Well Lewis Carroll (author of Alice and Wonderland) and I are on good terms given that he was a mathematician!  So mad I am. BTW, QuickBase's security slipped to a B on SSLLabs because of ...

This server accepts the RC4 cipher, which is weak. Grade capped to B.
https://www.ssllabs.com/ssltest/analyze.html?d=quickbase.com
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,208 Points 50k badge 2x thumb
I did not know Louis Carrol was a mathematician, nor did I realize that at one time you were friends with him back in the 1800's before his death in 1898.  The Wiki article about him is indeed fascinating, so that alone has been educational.  https://en.wikipedia.org/wiki/Lewis_Carroll

I will count on you to keep tabs on QuickBase Security for us.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,024 Points 20k badge 2x thumb
QuickBase's crypto security is excellent (2048 RSA). Historically they consistently scored an A on SSLLabs. it was downgraded to A- for lack of perfect forward secrecy, then to a C with rc4nomore because SSLLabs capped it and then changed their rating algorithm to cap it at a B instead of a C. But it is all security theater. Have a laugh:

A new and serious vulnerability has been identified in a popular software library. How do we know it's serious? Because the vulnerability has a clever name, sweet logo, and as much hype as we can generate from a single web page.
http://backronym.fail/

You are vastly more likely to misplace your password than to have security episode with QuickBase.