Open knaveenstar opened 6 years ago
hello, you have to uncomment line 108 in the config.peoplepicker.js file:
//SPClientPeoplePicker.SPClientPeoplePickerDict[pickerId].ResolveAllUsers();
Then when you update your angularjs model with a user - it will automatically validate it. And if you want to validate a input box on page load, I did this:
var userid = _spPageContextInfo.userId; var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; $http.get(requestUri, { headers: { 'Accept': 'application/json;odata=verbose' } }).then(function(res){ vm.textboxpp = {'Name':res.data.d.LoginName,'Id':res.data.d.Id,'Title':res.data.d.Title}; });
In my input directive I have ng-model="vm.textboxpp". I am using the controller as syntax method which means not using $scope.
Hi, I have an requirement to set the value in people picker. I am passing the json object, its shows like unresolved user, I want to call the resolve user method after setting the value.