Feb 14, 2012 at 7:00 PM
Edited Feb 14, 2012 at 7:28 PM
Trying to get the "Assigned To" (a peoplepicker) on a SharePoint NewItem form to pre-populate with the current user.
I used selectorgadget to obtain the following id of my formfield- #ctl00_m_g_7eb2db37_cd89_4064_bb9d_3b85682bc642_ff6_1_ctl00_ctl00_UserField_downlevelTextBox.
I also have studied
Marc Anderson's blog posts,
Dave Cavins' blog, as well as some of the documentation for the SPServices jQuery library for SharePoint. I adapted the following script to fit my needs
fieldName: "Assigned To",debug: false})
However, it is not working for me. The "Assigned To" field is blank when NewForm loads, and still blank after I save the record. Can anyone tell me what I'm doing incorrectly?
UPDATE1: the method .text() to set the CurrentUser seems a little suspect to me, as you are actually telling the people picker to look for the AD_object, so I tested .val() instead, however that didn't work either.