0

I want to compare text of 2 people picker which are on same form.how to do it using JavaScript or Jquery. I have already gone through so many blogs but they are not providing the exact solution that i want.

1

You can use a Sharepoint function to do it that is called GetPickerControlValue. You'll need to known the HTML ID of the both fields. Then just use GetPickerControlValue("ID_of_the_UserField", false, false) to get the value.

|improve this answer|||||
0

SPUtility.js is free javascript library which does this very well.

Example

You need to add the js reference in your master page.

// Get the field
var peopleField = SPUtility.GetSPField('Assigned To'); 
//here "assigned to" is field name

spservices.js also supports this. Example

var salesRep = $().SPFindPeoplePicker({
    peoplePickerDisplayName: "Column Display Name"    
}); 

Let me know if you need more help.

|improve this answer|||||

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.