首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从SharePoint peoplepicker中获取多个返回以存储在列表中

从SharePoint peoplepicker中获取多个返回以存储在列表中
EN

Stack Overflow用户
提问于 2017-05-04 02:37:42
回答 1查看 306关注 0票数 0

我一直收到“您只能输入一个名称”的消息。在我用以下代码创建的peoplepicker输入框(Div)中:

代码语言:javascript
复制
// Render and initialize the client-side People Picker.
function initializePeoplePicker(peoplePickerElementId) {

    // Create a schema to store picker properties, and set the properties.
    var schema = {};
    schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
    schema['SearchPrincipalSource'] = 15;
    schema['ResolvePrincipalSource'] = 15;
    schema['AllowMultipleValues'] = true;
    schema['MaximumEntitySuggestions'] = 50;
    schema['Width'] = '280px';

    // Render and initialize the picker. 
    // Pass the ID of the DOM element that contains the picker, an array of initial
    // PickerEntity objects to set the picker value, and a schema that defines
    // picker properties.
    this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
}

即使它有“schema‘’AllowMultipleValues‘= true;”声明,在我必须将用户输入peoplepicker放入的div中,我仍然得到唯一允许一个名字的消息。为什么?

它允许我输入多个名字,并从弹出的下拉列表中选择名字,但当我去收集名字时,它似乎不让我从输入框中收集所有名字。

EN

回答 1

Stack Overflow用户

发布于 2017-05-09 22:32:14

我有一个打字错误:

架构“‘AllowMulitpleValues”= true;

不是:

架构“‘AllowMultipleValues”= true;

我不能从我的源代码中复制我现有的代码。我不得不直接输入它,直到一个同事发现了它,我才发现它有什么不同。“il”到“li”需要切换。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43767678

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档