A
A
Alexander Kaplun2016-04-18 15:44:34
SharePoint
Alexander Kaplun, 2016-04-18 15:44:34

How to make a modal window in Sharepoint 2013 Foundation?

Good day,
I want to make my own buttons for adding items for the standard "Tasks" list in SharePoint 2013, but what would the windows look like when using the standard "Create Item" button.
I can't figure out how to use SP.UI.ModalDialog.showModalDialog to call the standard element creation dialog.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Buzin, 2016-04-19
@Buzzz

Everything is simple there!
var options = {
title: "Window title",
// If there is a ready-made form
//url: "Form URL",
// Or you can use your own html
// html: yourHtml,
height: 400,
// Parameters if you need to pass something to the modal window
//args: {
//},
dialogReturnValueCallback: function (result, reval) {
//Callback if necessary
}
};
//Or (If connected to the SP.UI page):
//SP.UI.ModalDialog.showModalDialog(options);
//Or (If it doesn't exist):
//window.OpenPopUpPageWithDialogOptions(options);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question