0
我不斷收到「您只能輸入一個名稱」的消息。在peoplepicker輸入框(格)我用下面的代碼創建的:從SharePoint peoplepicker獲取多個返回以存儲在列表中
// 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);
}
即使它具有「模式[‘AllowMultipleValues’] = TRUE;」聲明,在我必須把用戶輸入peoplepicker的div,我仍然得到唯一的一個名稱允許的消息。爲什麼?
它允許我輸入多個名稱,並從彈出的下拉菜單中選擇名稱,但是當我去收集名稱時,似乎不讓我從輸入框中收集所有名稱。
我還沒有找到任何東西,除了一些關於它的地方,其中在XML中,需要MULT = TRUE;我不認爲這適用於我。任何其他想法? –