Problem with Manager Fieldname

Feb 23 at 1:33 PM
Hi, I'm hoping someone can help!

I'm trying to populate a number of fields to a basic new item form but for some reason I cant get the manager field to populate. The code I am using looks like this:
    $(document).ready(function() {
        //Manager
        var userManager = $().SPServices.SPGetCurrentUser({
        fieldName: "Office"
        });
        $("input[Title='Manager']").val(userManager);
    });
There doesn't seem to be an issue with the input name as i can write other fieldnames to it without issue. This is working on the same page:
$(document).ready(function() {
        //Office
        var userOffice = $().SPServices.SPGetCurrentUser({
        fieldName: "Office"
        });
        $("input[Title='Office Required Field']").val(userOffice);
    });
Thanks,

Nick
Coordinator
Feb 24 at 2:56 PM
I'd assume that the Manager column is a User or Group column? i.e., a People Picker? If so, take a look at the SPFindPeoplePicker function.

M.