4

From what I can tell, the Sharepoint 2013 Peoplepicker loses its autocomplete functionality (and defaults to the old style) any time it's used on a form page other than the default "NewForm.aspx".

Does anyone know of a workaround to keep autocomplete functionality on custom form pages?

I know how to use the SPServices library to accomplish the same thing, but I'd much rather rely on the built-in method if possible.

1

I know this is an old post, but I have an answer for it so I thought I would share. I have been able to successfully create a non-default 'NewForm2' file for a list using PowerShell and still retain the original OOTB ability of the people picker to autocomplete.

Like many others I found that creating a new list form using SPD stripped the OOTB people picker for an older version which did not perform as expected. How I solved this problem was to simply not use SharePoint Designer. I used PowerShell to create a new form for the specified list and was pleased to find that the OOTB autopicker functionality for the people picker once again worked as expected. The dropdown populated with the pool of results and I was also able to successfully save the form with the people picker value.

$url = "http://SiteURL/"

$listname = "NameOfList"
$web = get-spweb $url 
$list = $web.lists[$listname]
$files = $list.rootfolder.files

$newformurl = $list.RootFolder.ServerRelativeUrl + "/NewForm2.aspx"

$newform = $files.add($newformurl, [Microsoft.SharePoint.SPTemplateFileType]::FormPage)

$wpm = $newform.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

$lfw = new-object ([Microsoft.SharePoint.WebPartPages.ListFormwebpart])

$ilist = [Microsoft.SharePoint.WebPartPages.IListWebPart]($lfw)

$ilist.ListId = $list.id
$ilist.PageType = [Microsoft.SharePoint.PAGETYPE]::PAGE_NEWFORM;

$wpm.AddWebPart($lfw, "Main", 1)

$list.DefaultNewFormUrl = $newformurl

$list.update()
-1

Are you using the new ClientPeoplePicker control?

<SharePoint:ClientPeoplePicker runat="server" ID="MyControlName" 
    Required="true"  
    ValidationEnabled="true"
    InitialHelpText="text"
    VisibleSuggestions="3"
    Rows="1"
    AllowMultipleEntities="true"
    CssClass="ms-long ms-spellcheck-true" />

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.clientpeoplepicker.aspx

  • 1
    Ok great, I didn't know about that... I'm trying to figure out how to correctly implement it. Apparently there's more to it than changing a Sharepoint:FormField tag to Sharepoint:ClientPeoplePicker. By doing so, I'm able to get a properly rendered/functioning autocomplete people picker, BUT it fails to save any data upon form submission. Does it need to go in an ascx file? (I've never worked with one of those, but I read some reference to them in my research) – syagla Mar 24 '14 at 15:27
  • Can you post your code as an edit to your question? – Robert Kaucher Mar 24 '14 at 16:12

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.