B i t s O f S h a r e P o i n t C o n s u l t i n g L L C > B l o g P o i n t > Posts > JQuery - List Collapse/Expand Multi-line Text Fields
JQuery - List Collapse/Expand Multi-line Text Fields
Paul Grenier is a JQuery solutions machine.  www.endusersharepoint.com. He has come out with another solution that many of us have wished for.
This solution solves a challenge with lists and multi-line text fields.  When you view a list with a multi-line text field the view can be dominated by that text field, so much that you cannot view any other list items in your view.
Most of us have eliminated or highly recommend not incorporating those fields.  But the users want to be able to view this important information.  So the user either had a list that looked bloated and had trouble seeing all the items without having to scroll and scroll.  Or eliminated the text field to have a tight viewable list, but then had to open each item to see the multi-text field, which is cumbersome. 
This solution is a happy solution.  Now you can add the multi-text fields with them being collapsed so that they do not take up the view.  You then have the ability to click an icon or text to expand to view the full text field and then click again to collapse.
I have created an example of Paul's work and have provided a modification to Paul's code that allows you to have an icon and text that is click-able.
Current code shows this:
Updated code will show this:
View Full Text
Here is the example and code:
Click to View Example



very nice site... <x0902>
at 9/2/2009 3:15 AM

Use on EditForm/NewForm.aspx

I have multi-line text fields for comments.  These comment fields may or may not be used initially, but may as a project progresses.  Is there a way to make this work on Edit and New?
at 2/11/2010 11:55 AM

Re: JQuery - List Collapse/Expand Multi-line Text Fields

This is a good question.  I would pose this to Paul as he is the one that wrote the original code.  His post can be found here: http://www.endusersharepoint.com/2009/02/20/jquery-for-everyone-collapse-text-in-list-view/
Peter Allen at 2/19/2010 10:05 AM

Group By Views

Indeed, a nice solution. Unfortunately I don't get it to work in a view that groups the result by list field. In this special case the code seems to be ignored. It works fine if I modify the view and remove the grouping. Any idea whether this can be fixed?
at 6/4/2011 12:21 PM

RE: Group By Views

Sorry, I have not had time to look at something like that.  with grouped views the data in the group is not loaded when the page is loaded only after you expand that group.  The code runs when the page is loaded.  The solution would need to watch for expanding of a group.
Peter Allen at 8/16/2011 11:24 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.


Body *

Addition: 2 + 1 = *

Please complete this equation.


This is optional.

 T o p i c P o i n t

 E x a m p l e P o i n t