In this post, I will tell you about how to use client side people picker in SharePoint 2013. The SharePoint people picker is already available in SharePoint as a server control, but now a days all are moving to client side based code since office 365 supports only client side. So we need to know how to be use people picker in client side.

Required JavaScript Library
The client side people works depends on multiples SharePoint JavaScript library,

Steps to Implement People Picker

Step 1
Refer the above JavaScript files in your page.

Step 2
Create a div tag in your page.

Step 3
Initialize the people picker on page load


Note – Usage of the parameters values
peoplePickerElementId(Text) – Id of the control.
AllowMultipleValues – Its used to define whether the control can allow multiple user or not.Possbile values are True or False.

True – will allow to add multiple Users.

False – will only allow single user.
PeopleorGroup(Text) – It’s used to define whether the control can allow users and groups are only user. Possible values are ‘PeopleOnly’or ‘PeopleAndGroups’

PeopleOnly – will allow only user to add.

PeopleAndGroups – will allow to add users and groups also.
GroupID(Int) : it’s used to define the users can add only from the specified group id. The possible values are
0 or any Group ID of the group

0 – its allows to get users from any groups to add.

Group Id – its allow to get users from specified group.

Get User values from the Control


The results will be after calling the methods: 40;#hmg\naveen.kumar;#30;#hmg\username;#