Pedro Posada | Collapsible fieldsets

Collapsible fieldsets

Posted on May 26, 2008 - 4:16pm
<< 36 of 54 >>

Code snippet to build collapsible fieldset like this one:

<?php
drupal_add_js
('misc/collapse.js');
drupal_add_js('misc/drupal.js');
?>


<fieldset class="collapsible collapsed">
<legend>
Title of fieldset goes here.
</legend>
<p>
Content goes here.
</p>
</fieldset>

Submitted by sudalairaj (not verified) on June 4, 2008 - 10:56am.

I am new drupal...

where we apply the php code for get collapisble fieldset
in content type body or otherwise...send your answer to my mail id.

Submitted by pedro on June 4, 2008 - 10:58am.

You would insert this code in any node using the full html input format or the php input format.

You can just create a page and insert the code there and select php input and hit submit.

Submitted by Anonymous (not verified) on July 12, 2011 - 11:55pm.

Firstly, I want to thank you for the useful and informative entry. I am so glad that I have found this your post. The information which you have shared for us is really good explained and I will definitely use it in my work. Thanks a lot one more time for the useful and detailed post and I will be waiting for more such great articles like this one from you in the nearest future.
asthma cure

Submitted by jeniallington (not verified) on September 25, 2011 - 11:30pm.

Great info. I like all your post. I will keep visiting this blog very often.
skin tag removal

Submitted by lutherday (not verified) on October 29, 2011 - 4:41am.

This information is quite helpful for the students like us who are preparing for this exam.
biogetica herpes

Submitted by Anonymous (not verified) on November 16, 2008 - 4:57pm.

your fieldset is not collapsable ;)

Submitted by pedro on February 19, 2009 - 11:01am.

Thanks, I fixed it now.

Submitted by Anonymous (not verified) on February 19, 2009 - 10:20am.

I am new drupal ...

where we apply the php code for get collapisble fieldset
in content type body or otherwise...send your answer to my mail id.

Submitted by pedro on February 19, 2009 - 10:59am.

You apply the code above in a page or in the body of any content type you are posting. You can apply the code in any post, as long as you are not using filtered HTML input format for that posting. Hope this helps.

Submitted by Lao (not verified) on March 24, 2011 - 7:50pm.

Thank you for sharing information like this. It’s very useful to me. Visit www.mgupload.net for more information about data mapping

Lao
www.mgupload.net

Submitted by bird feeders (not verified) on May 16, 2011 - 10:27pm.

Thanks for a nice guide.I like your post and all you share with us is up to date and quite informative,

Submitted by webalchemist (not verified) on June 14, 2011 - 11:13am.

Thank you for hosting this page!

1) your fieldset is not working at this time

2) I had a problem where the fieldset worked when I saved it but then when I refreshed the page it was not working.

I disabled Java compile and boost for that page, but still broken.

moving:

<?php
drupal_add_js
('misc/collapse.js');
drupal_add_js('misc/drupal.js');
?>

to the bottom of the page fixed it for me.

Submitted by asbestos surveys london (not verified) on June 23, 2011 - 11:31pm.

So nice code.Keep it up!

asbestos surveys london

Submitted by Johnny Quid (not verified) on July 8, 2011 - 11:25pm.

Awesome ! It works Gr8!
But when i collapse and un-collapse a fieldset the fields in it become distorted, and when i refresh it they will become normal.
Do you know what is causing it ?
Rolex Watch

Submitted by dustin buttry (not verified) on July 21, 2011 - 11:36pm.

Hello,
sorry if this question is a little bit silly, but these php-things are not my friends.
I create a fieldset in my node-something.tpl.php like this:

TEST-Fieldset

Now, where and how exactly do i have to include this “drupal_add_js(‘misc/collapse.js’” ?
I am searching through the internet since 2 hours. And cant find anything what could help me, so i would be really thankful for any help.
russ brown motorcycle attorney

Submitted by Nomad (not verified) on July 29, 2011 - 12:37pm.

I was having a little trouble with the
tags, but this also seems to work in it's place:

Submitted by Nomad (not verified) on July 29, 2011 - 12:39pm.

I was having a little trouble with the
tags, but this also seems to work in it's place:

<script type="text/javascript" src="/misc/collapse.js"></script> <script type="text/javascript" src="/misc/drupal.js"></script>

(sorry about the other message - not sure how to display code here)

Submitted by atter toner (not verified) on August 18, 2011 - 4:57am.

Snippet management is a text editor feature popular among software developers or others who routinely require content from a catalogue of repeatedly entered text such as with source code or boilerplate. Often this feature is justified because the content varies only slightly (or not at all) each time it is entered.
cuff links

Submitted by Antony Rogue (not verified) on August 21, 2011 - 9:55pm.

Fieldset can be expanded or collapsed by clicking it's legend.Fieldset can be initialized to be collapsed or expanded at page load.The look and feel can be modified by editing the CSS file.
2wired2tired.com

Submitted by wilfordcimo Hipolito (not verified) on September 18, 2011 - 11:06pm.

The code selects the fieldset, then its children, selects everything that is not the label, and then toggles it. You published a really important information! Thanks for sharing. electroless nickel plating

Submitted by warick noll (not verified) on August 22, 2011 - 4:36am.

The solution was to use actual php code and drupal's drupal_add_js call to integrate the appropriate scripts.
restoration chambersburg pa

Submitted by kareen padgette (not verified) on September 4, 2011 - 10:15pm.

Can anyone tell em how to add collapsible field set in theme? The information you provided is good but not enough for me. Please post more knowledge of you. Thanks for sharing. . And cant find anything what could help me, so i would be realy thankful for any help.
hose holder

Submitted by Blake Barkley (not verified) on November 12, 2011 - 3:46pm.

We have been looking for a good content management solution. We are not sure if we should go with a cloud-based service or local storage service. With e-mail, we have looked into outlook pst recovery options. We have found them local storage has been an asset in this case. What would your recommendation be for content management system?

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.