我一直收到“您只能输入一个名称”的消息。在我用以下代码创建的peoplepicker输入框(Div)中:
// 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中,我仍然得到唯一允许一个名字的消息。为什么?
它允许我输入多个名字,并从弹出的下拉列表中选择名字,但当我去收集名字时,它似乎不让我从输入框中收集所有名字。
发布于 2017-05-09 22:32:14
我有一个打字错误:
架构“‘AllowMulitpleValues”= true;
不是:
架构“‘AllowMultipleValues”= true;
我不能从我的源代码中复制我现有的代码。我不得不直接输入它,直到一个同事发现了它,我才发现它有什么不同。“il”到“li”需要切换。
https://stackoverflow.com/questions/43767678
复制相似问题