Open an InfoPath form in a dialog
Posted: 2012-01-15 Filed under: InfoPath | Tags: Form web part, InfoPath, Modal dialog, Pop Up, SharePoint 2 CommentsHi everyone!
I would like to share with you how you could open a form in a dialog in SharePoint.
- Add a Form web part on a page of your choise.
- Replace the code with this:
<div> <a href="javascript:{ SP.UI.ModalDialog.OpenPopUpPage('/sitename/_layouts/FormServer.aspx?XsnLocation=/sitename/library/forms/template.xsn&OpenIn=browser&SaveLocation=/sitename/library', null, 1000); };">Open form</a></div>
- Replace sitename and library with the ones in your environment.
- Click Save and OK in the web part and try it out!
Thats it!
/Niax