2

I have a custom SHarePoint List that holds a User Lookup.

Now I want to customize the layout in the display or edit form. In both I must render the PeoplePicker Control.

This is my code

(function () {
   var ctx = {};
   ctx.Templates = {};
   overrideContext.Templates.Item= customDisplay;
   SPClientTemplates.TemplateManager.RegisterTemplateOverrides(ctx);
})();
function customDisplay (ctx){
   var result = ".....<div>MYPEOPLEPICKER_HERE</div>";;
}

How can I render the PeoplePicker control? Is that possible to do this in the Item-Template?

0

Found a solution for this.

I must add the JavaScript files for the controls in the Page (with sharepoint designer). After that I could access the Methods to render the control.

The solution based on this answer: How Can I Use the SharePoint People Picker Control in my Custom Web Part?

I also blogged the solution details in this:

http://sharepointsascha.tumblr.com/post/105105848809/how-add-people-picker-into-jslink-viewform

Hope this helps anyone in future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.