How to adjust width of SharePoint Lookup Field Multi-Select View Solution

18-03-13
How to adjust width of SharePoint Lookup Field Multi-Select
Hello, flamsens
ASK
ANSWER
TOPICS
ARTICLES
Help
WEBINARS
About Us
My Account
TUTORIALS
Log Out
BUG FINDER
+
Search Experts Exchange
Experts Exchange > OS > Microsoft OS > MS Server OS > MS SharePoint > How To Adjust Width Of SharePoint Lookup Field …
or Go to Advanced Search
View Solution
Ask A New Question
How to adjust width of SharePoint Lookup Field Multi-Select
Workspace
Profile
My Open Questions
0
My Answered Questions
0
I have a list form containing several multi-select lookup fields. A multi-select lookup field
My Monitored Questions
0
has two boxes. The box to the left contains the lookup values and the right box contains the
My Participated Questions
0
My Topics
0
which value to select.
My Knowledgebase
0
How can one expand the width of these boxes?
My Articles
0
My Blog Entries
0
Saved Searches
0
My Projects
0
My Participated Projects
0
Asked by: RodneyGee
values selected/added from the left had side box. The default size of these boxes are too
small for the allowable values, thus making for a poor user experience when determining
Topic: MS SharePoint
Participating Experts: 1
Points: 500
Comments: 12
2011-07-11 at 18:32:22 ID: 27191951
Request Attention
Help
Top MS SharePoint Experts
Answers
Week Month
EXPERT COMMENT
1.
olumn.html
AUTHOR COMMENT
by: RodneyGee Posted on 2011-07-11 at 18:59:24 ID: 36170483
Thanks but this does not address how to modify the widths of the left and right side boxes for a
multi-select lookup fiield.
EXPERT COMMENT
by: rebejones Posted on 2011-07-11 at 19:01:18 ID: 36170492
Sorry try this one. http://spservices.codeplex.com/wikipage?title=$%28%29.SPServices.SPSetMultiS
electSizes
AUTHOR COMMENT
by: RodneyGee Posted on 2011-07-12 at 05:38:00 ID: 36172862
I found this article prior to submitting the question on Experts exchange, but did not understand
how to execute it. The article calls for creating a function that sets the width sizes, and then using a
script that call the function. I need assistance with where the to store the function and where to
www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27191951.html
Overall
RainerJ
Overall
225,990
Guru
by: rebejones Posted on 2011-07-11 at 18:52:00 ID: 36170451
See if this link works for you. http://kjellsj.blogspot.com/2009/06/sharepoint-jquery-setting-td-c
Year
2,000 points yesterday
Profile
2.
ACH1LLES
182,069
3.
BobHavertyComh
95,451
4.
JamieMcAllister
85,437
5.
yagyashree
77,108
6.
teylyn
69,338
7.
KoenVosters
53,342
8.
sharepointguru14
29,750
9.
QPR
25,200
10. dhawalseth
22,750
11. mohitnair87
21,620
12. kukdai
19,950
13. clayfox
18,740
14. EugeneZ
11,049
15. colly92002
10,300
16. FastFngrz
10,000
17. tedbilly
9,000
18. CodeCruiser
6,100
19. write2mohit
6,000
1/4
18-03-13
How to adjust width of SharePoint Lookup Field Multi-Select
place the script that calls the function.
LinkCan you provide guidance for that?
Thanks
Email
EXPERT COMMENT
20. 66866
5,600
21. einarbrown
5,350
22. Rgonzo1971
5,200
Monitor
23. quihong
5,050
by: rebejones Posted on 2011-07-12 at 06:21:39 ID: 36173103
Save
24. EvoLord
4,900
1. First you are going to need to download
Print SpServices and jQuery files. I usually make a utilities
25. Iammontoya
4,650
document library and put them in there.
2. Next go to the list you want to expand the multi-select box on and click on new.
3. Now click on Site Actions and Edit page- If the Edit page is grayed out then put (toolpaneview=2)
without the parentheses in the address bar i.e. if my page is http://site.com/lists/testlist/newfo
rm.aspx?RootFolder... take out RootFolder and everything after it and replace so that your address
reads http://site.com/lists/testlist/newform.aspx?toolpaneview=2
4. Add a content editor webpart to the page below your list. Click to edit the webpart and select
Source Editor- This is where you are going to place your code.
5. Your code will be as follows: Make sure to change the first two lines to where you placed your
jQuery and and SPServices files. For instance if you put it in a document library called utilities then
you will change the lines to read something like: <script language="javascript" type="text/javascript"
src="http://something.com/utilities/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" srchttp://something.com/utilities/jquery.SPSer
vices-0.5.6.min.js"></script>
The quick way to get this is to open up notepad and go to the document you uploaded and right click
on it and copy the short cut. Paste it into notepad and then copy the other link and paste into
notepad then copy into the code. Based on the code you can put a min and max but I would let it
default itself instead of trying to figure out how big it should be. Before closing the Content Editor
WebPart you will need to hide it so it doesn't show on the page. Click on Layout and check the check
box next to hidden. Let me know if you need more help.
1: <script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery-1.4.2.min.js"></script>
2: <script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery.SPServices-0.5.6.min.js"></script>
3:
4: $().SPServices.SPSetMultiSelectSizes({
5:
multiSelectColumn: "name of your column",
6:
});
Select all
Open in new window
ACCEPTED SOLUTION
500
by: rebejones Posted on 2011-07-12 at 06:33:14 ID: 36173212
excellent
Sorry just realized i left off a line fo code it should be as follows:
1: <script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery-1.4.2.min.js"></script>
2: <script language="javascript" type="text/javascript" src="/jQuery%20Libraries/jquery.SPServices-0.5.6.min.js"></script>
3:
4: $(document).ready(function() {
5: $().SPServices.SPSetMultiSelectSizes({
6:
multiSelectColumn: "Name of your Multi-select Column"
7: });
8: // You can include other script which you want to run at page load in this block as well
9: });
Select all
Open in new window
Add to Knowledgebase
EXPERT COMMENT
by: rebejones Posted on 2011-07-14 at 04:55:38 ID: 36187284
Did you have any problems implementing the code?
www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27191951.html
2/4
18-03-13
How to adjust width of SharePoint Lookup Field Multi-Select
AUTHOR COMMENT
by: RodneyGee Posted on 2011-07-14 at 05:26:10 ID: 36187441
Not at all. Your extra tip on the toolpaneview2 was also very appreciated, as the newform page
initially did not allow for an edit page.
Thanks again, your advice was A+++!
EXPERT COMMENT
by: rebejones Posted on 2011-07-14 at 05:43:46 ID: 36187538
You are welcome. Also if you want th width of the box extended on the edit page and display page
you are going to have to do the same thing as above for those pages.
EXPERT COMMENT
by: rebejones Posted on 2011-07-17 at 09:48:33 ID: 36203809
Do I receive credit for helping you?
AUTHOR CLOSING COMMENT
by: RodneyGee Posted on 2011-07-18 at 06:12:38 ID: 36207223
Top notch assistance. Went the extra mile to help solve my question. Thanks.
AUTHOR COMMENT
by: RodneyGee Posted on 2011-07-18 at 06:14:47 ID: 36207239
Hello,
I thought I did award full credit on 7/12 by accepting the solution and providing "A" grades. I
thought it awarded the full points for the question, I believe 500.
Post a Comment
Attach File
Preview
Also Share On
Facebook
Submit
Twitter
LinkedIn
www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27191951.html
3/4
18-03-13
How to adjust width of SharePoint Lookup Field Multi-Select
WHAT IS EXPERTS EXCHANGE?
OUR COMMUNITY
GET SUPPORT
THE COMPANY
Overview
Point System
Site Help
About Us
How it works
Expert Benefits
Support Center
Contact Us
Features
Expert Awards
Terms of Use
Blog
View Topics
Business Accounts
Privacy Policy
Tech News Blog
Plans & Pricing
Customer Support
Site Map
EE Store
Our Customers
Job Board
URL Shortener
Browse All Topics
MAIN TOPICS
TRENDING TOPICS
Microsoft
Digital Living
Security
Developer
iOS
MS SQL Server
Exchange
WordPress
Apple
Virus & Spyware
Programming
Storage
JavaScript
Android
C#
Oracle Database
Internet
Hardware
Web Development
OS
MS Access
Visual Basic .NET
Outlook
Visual Basic Classic
Gamers
Software
Networking
Database
Java
MS Excel
PHP
.NET Programming
Mobile Site
© 1996-2013 Experts Exchange, LLC. All rights reserved. Covered by US Patent.
www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_27191951.html
4/4