clientpeoplepicker used in custom newform.aspx not passing values to list

Hi,

I got stuck with a specific problem when trying to use the clientpeoplepicker in a custom newform.

As I created the custom newform SharePoint replaced the new and stylish peoplepicker with the "old" one (with both buttons - browse, check). Also the autofill-function is not available anymore.

I searched on the net for a while but couldn't find anything that works for me.

The "old" formfield -code is like:

<SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="New" FieldName="AUS" __designer:bind="{ddwrt:DataBind('i',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@AUS')}"/>


When I use the clientpeoplepicker with the same ID - code:

<SharePoint:ClientPeoplePicker runat="server" ID="ff10{$Pos}" Required="false" ValidationEnabled="false" VisibleSuggestions="3" Rows="1" AllowMultipleEntities="true" CSSClass="ms-long ms-spellcheck-true" />

it renders correctly and the query against AD also functions correctly. I still can choose the user - or multiple users...

but when it comes to save the values and store them in my list, there is no value in the field.

I think the values are not passed to the list when using the clientpeoplepicker ...

Does anyone have a solution to this?

Many thanks in advance!

Kind regards,

Thomas Berger

October 1st, 2014 11:06am

I have the same problem :_(
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2014 4:08pm

I am able to resolve this with a small work around with something like below using SPServices.

$(function(){

var checkExist = setInterval(function() {
   if ($("nobr:contains('AUS')").closest('td').siblings('td').find('input.sp-peoplepicker-editorInput').length) {
      //console.log("Exists!");
      $("nobr:contains('AUS')").closest('td').siblings('td').find('input.sp-peoplepicker-editorInput').focusout(function(){

  populateUserProfileProperties($("nobr:contains('AUS')").closest('td').siblings('td').find('span.sp-peoplepicker-userSpan').attr("sid")); 
 
});  
      clearInterval(checkExist);
   }
}, 100); 

});

function populateUserProfileProperties(accountName){
$().SPServices.SPFindPeoplePicker({
   peoplePickerDisplayName: "AUS",
   valueToSet: accountName ,
   checkNames: true
  });
}

In the custom new form, I have used the below

<td width="400px" valign="top" class="ms-formbody">
<SharePoint:ClientPeoplePicker runat="server" id="AUS{$Pos}" />
<div style="display:none;"> <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="AUS" ></SharePoint:FormField></div>
<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="AUS" ControlMode="New"/>
</td>

Hope this helps.

Thanks & Regards,

Srikanth

September 11th, 2015 2:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics