Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPFindPeoplePicker AutoFill Set & Get values from PeoplePicker

$
0
0
Hi Marc and everyone else!

I've been struggling building a form that works across all browsers and devices in SharePoint and is has the auto fill capabilities for the people pickers. As soon as I get one working I'm pretty sure I can extrapolate the rest. Goal is on page load to find the current user and their manager and have it checked into separate people picker controls but allow the user to change the fields to another user if they need to.

I think all I need is some help in getting and setting the PP values and I'll be set. I may be going about this the wrong way all advise would be great!
<form id="lyncRequest" runat="server">
<label for="User">User:</label>
<nobr style="display:none">User</nobr>
<SharePoint:PeopleEditor id="spPeoplePickerUser" Name="User" PlaceButtonsUnderEntityEditor="True" MultiSelect ="False" runat="server" SelectionSet="User">

<label for="Manager">Manager:</label>
<nobr style="display:none">Manager</nobr>
<SharePoint:PeopleEditor id="spPeoplePickerManager" Name="Manager" PlaceButtonsUnderEntityEditor="True" MultiSelect ="False" runat="server" SelectionSet="User"/>

</form>
    $().SPServices.SPFindPeoplePicker({
        peoplePickerDisplayName: "User",
        valueToSet: userID,
        checkNames: true
    });
    $().SPServices.SPFindPeoplePicker({
        peoplePickerDisplayName: "Manager",
        valueToSet: managerID,
        checkNames: true
    });

// I found I can add the user names to the People Pickers this way but it does not check the names 
       var userpeoplepicker = $("tr [id*='User'] div[title='People Picker']");
    userpeoplepicker.html(userID);
       var managerpeoplepicker = $("tr [id*='Manager'] div[title='People Picker']");
    managerpeoplepicker.html(managerID);    
Any and all assistance would be greatly appreciated.
Thanks!

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>