Javascript when fieldset opened make another fieldset appear

I have multiple fieldsets - group-pers-banking-info2, group-pers-banking-info3, group-pers-banking-info4 and group-pers-banking-info5 - what I’d like to do is hide fieldsets 3, 4 and 5 and once someone opens group-pers-banking-info2 group-pers-banking-info3 would appear. And once an end user opened group-pers-banking-info3, group-pers-banking-info4 would appear and so on. How could I make this happen? I saw javascript that when you check a box a fieldset appears but nothing for what I need. Please let me know, thank you.

instead of writing a script, something like this looks to be ideal… choose methods>show/hide

http://elmahdim.com/checkbo/

thanks but I do not want to use a checkbox, I want another fieldset to appear once the previous fieldset is opened (it’s initially collapsed).

Can you please give us some example code for your fieldsets? That will help us to come up with a reliable working solution for your situation.

Also also, what do you mean when saying that a previous fieldset is opened? Are you meaning when a fieldset is changed from being hidden to shown? If so, how does that relate to the first fieldset?

Here’s a css example of what I think is being asked for.

Of course I think JS is probably better utilised here to do this but was fun to try :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.