I need to open a SharePoint form from an image button but in a modal dialog box. Is that possible?
Thanks in advance
You can do it using following JavaScript.
function openDialog(){
var pageUrl = "your form url";
var options = { url: pageUrl, width: 700, height: 600};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
Make a reference to SP15ModalDialog.js on your page, then you can do stuff like
<span class="addNew" onclick="openInDialog(870,850,true,true,false,'https://...myPage.aspx?IsDlg=1')">label</span>
See https://gist.github.com/javierguerrero/5249652dea3d389727e0 for details
You can append &IsDlg=1 to the end of the link to hide the ribbon and navigation bars
You can change the default dialog options on a list or library...
List / Library Settings > Advanced Settings > Dialogs