Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 - Custom Display Template - People Picker Field - Separate Multiple Names in Display

$
0
0

Hello Community!

I'm working in SP 2013 and I'm building a custom display template.  As part of the template I am returning a people picker field.  The field is set to "Allow Multiple Selections", and to show "Name (with Presence)".  In my display template I have the following settings related to the People Picker field:

  • mso:ManagedPropertyMapping: 'Preparer'{Response Preparer}:'PreparerOWSUSER'
  • JavaScript: var preparer = $getItemValue(ctx, "Preparer");
  • item-container: <td> _#= preparer =#_ </td>

The problem is this, when the template displays multiple names, such as Jones, Mike and Smith, Mary, it looks like this:

   Jones, MikeSmith, Mary

Of course, the way I want it to look is like this:

   Jones, Mike Smith, Mary

Or even better:

   Jones, Mike | Smith, Mary

Has anyone else ever done this? If so then please provide guidance, code examples and/or article links.

Thanks!

Tom



Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award - Linked-In - SharePoint Gypsy


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>