Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to initialize people picker control in a modal dialog

$
0
0

Hi expert,

I'm using below function to open a modal dialog, in this modal dialog I need a people picker control, but not sure how to initialize it using SPClientPeoplePicker_InitStandaloneControlWrapper() function in my case because the content of the dialog are created on the fly.

function AddNewDeckRequest(){
varMyHtmlElement ="....HTML string that contains a div with id=poplepicker_1...";
// Define the Modal's options
var options = {
// define a URL (and yes, you can pass params to that URL) or reference your HTML object, but NOT both!
//url: '../MyPage.aspx?MyParam=' + SomeVar + '&IsDlg=1',
html: MyHtmlElement,
title:"Add new deck request",
allowMaximize: false,
showClose: true,
width: 800,
height: 800
};
// This ensures the supporting JS needed is loaded on the page
SP.SOD.execute('sp.ui.dialog.js','SP.UI.ModalDialog.showModalDialog', options);
}

Thanks,

Michael


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>