2

A SharePoint list has a multi-select choice field.

When 2 or more values are selected for an item,it is displayed(in the view)as:

Value1,Value2,Value3,Value4,Value5,Value6

Is there a way that I can display this field as shown below?

Value1,
Value2,
Value3,
Value4,
Value5,
Value6

George
  • 1,512
  • 2
  • 24
  • 60

1 Answers1

3

This should do it:

  1. Download jQuery and save it to /SiteAssets/
  2. Create a JavaScript file named comma-break.js and save it in /SiteAssets/ with the contents of:

$(document).ready(function () { var str = $('.ms-listviewtable').html(); //; $('.ms-listviewtable').html(str.replace(new RegExp(", ", "g"), ",</br>")); });

  1. Add a Content Editor Web Part to your list and link to the jquery.min.js file.
  2. Add a Content Editor Web Part to your list and link to the comma-break.js file.
James Flattery
  • 307
  • 2
  • 16