문제

i have a small requirement where in, i have a column "Employee Name" as a people picker field, now i just want to retrieve the employee name value in a variable after the user has entered his name in it.

도움이 되었습니까?

해결책

You can extract Display Name from people picker element by following statement.

var employeeName = SPClientPeoplePicker.SPClientPeoplePickerDict["EmployeeName_TopSpan"].GetAllUserInfo()[0].DisplayText

Please note: "EmployeeName" here in "EmployeeName_TopSpan" is the people picker div element id

and

assuming that people picker will have only entry therefore we have taken zeroth index result from GetAllUserInfo method.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top