Hobnob11 Hobnob11 - 9 months ago 68
Javascript Question

How to use Client Side PeoplePicker in SharePoint

So in SharePoint, the default "add new item to list" form uses the Client Side "PeoplePicker" for entering in users names, which has a nice dropdown auto-suggest box when you type someones name in. However when you create a custom form it reverts to the server side method of typing the users full name or opening up an address book.


There are multiple guides on how to use a small amount of JavaScript in order to fix this, including a MSDN guide. However I have been unable to find a guide on how to insert this JavaScript into my custom form.

Answer Source

So the actual question right now is how to add java-script into a custom form?

As so often there are multiple ways to achieve this:

Option 1:

Navigate to the list and in the ribbon there is the "List" tab with the section "Customize List". In this section you'll find "Form Web Parts". Choose the form you want to edit from the dropdown. You'll be redirected to the form in edit mode. Here you can add a script editor webpart and copy-paste your script. Alternatively save it in the Style Library and add a reference to it.

Option 2:

Navigate to the list and add/edit/display an item. Then choose "Edit Page" from the menu of the settings icon.

Option 3:

Open the list in sharepoint designer. There is a section "Forms". Here you can right click to edit the form directly and add a reference to your script.