When selecting multiple values, the data is separated with semicolons. When many values are selected it starts looking cluttered.

Is there any way to have each value on a new line?

For example, instead of:


I would like:


I'm using a lookup column inside a picture library. When looking at it within SPD it renders as a webpartpages:ListFormWebPart.

Is there any way of accomplishing this with Javascript?

4 Answers 4


I had a similar item come across my dest a few days ago. Using javascript and jquery. The code replaces the html coding of a semicolon with a html line break. It then copies the code and replaces the orginal code with it.

    var htmlstr = $(this).html();
    var htmlmod = htmlstr.replace(/; <A/g,"</br><A");
  • Thanks so much, this code really helped. One remark: I did have to lower the capitalization of the A tags: var htmlmod = htmlstr.replace(/; <a/gi,"</br><a");
    – Fer
    Oct 7, 2013 at 10:29

I think Spservice and multiple choice filed values will help you to work around this problem.


You might be able to use an article by Dessie Lunsford to create a calculated column to search and replace the semi colon with a space. This one might be helpful too.

  • 1
    I appreciate your help, but I don't think a calculated column will help me in this instance. The calculated column will not let me select the lookup column I need to alter. The lookup column is a semicolon separated list of multiple images that belong to another picture library. I was able to use javascript to replace the semicolon with a line break, but it breaks the links of the images. Anyone have any ideas?
    – user2302
    Feb 2, 2011 at 13:55

I ran into the same problem as the OP and found @JBlountJr answer to work fine except on our users with IE11. This code was able to do the trick in all our browsers. Hopefully this helps someone.

Note: I modified the DispForm.aspx page and gave the the lookup column an Id. Edit: Previous code actually did a few funky things to the URL's.

 $("#myId").contents().filter(function() {
    if (this.nodeType === 3){


$("#myId").contents().filter(function() {
    if (this.nodeType === 3){ 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.