You are viewing limited content. For full access, please sign in.

Question

Question

How do I collapse numerous sections under one section?

asked on November 10, 2015 Show version history

I am creating a form that I would like to show only three sections once the form has been opened;

  • Instructions
  • Form
  • Signatures

 

For both the 'instructions' and 'signatures' section in my form I am happy with because as you expand the section it will reveal either the instructions for the form (which is basic text) and the 'signatures' sections will show the basic 'sign' function in Laserfiche.

 

However under the 'form' section, once expanded, I would like it to reveal the 9 collapsed other sections of my form & under each of these 9 sections is a basic question and radio button 'Yes' or 'No' selection.

 

I am struggling to collapse numerous sections under one section - in the attached image I want to have the nine sections below the circled 'Form' section be expandable and collapsible. Any Help is welcomed!

 

Christian 

Capture.JPG
Capture.JPG (168.28 KB)
0 0

Answer

SELECTED ANSWER
replied on November 11, 2015 Show version history

Should be able to do this with a little Javascript. Add the CSS class "OuterSection" to the Form Section header. Then add the CSS class "InnerSection" to all of the ones you want below it. Finally, add the following to your javascript section:

$(document).ready(function(){
    $('.InnerSection').appendTo($('.OuterSection>ul'));
});

On page load, this moves your InnerSection headers underneath the list element inside the OuterSection header. The <ul> list element is the thing that is being hidden or shown on expanding the section.

Note, you may want to add some additional CSS styling on the "InnerSection" headers to differentiate them from the top-level headers. Maybe a little padding or a change in font size.

1 0

Replies

replied on November 12, 2015

Hi Scott, 

This worked perfectly - Thank you!

 

Christian

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.