Wednesday, September 25, 2013

Pop Up Form For Content Types And Custom Forms

I had a blog post earlier about how to link directly to the new form page for multiple content types, but how do we get that nice SharePoint pop up window that our users are used to seeing?  In my scenario I had created custom InfoPath 2010 forms for each of my content types in my SharePoint 2010 list.  This tutorial provides the syntax to make your links POP!  This is very simple, but is extremely handy if you want to keep the user on the same page and not have to redirect your user to the actual newform.aspx page.

Code Needed:

Javascript:OpenPopUpPage(‘Your URL For The New Form’)

Example

javascript:OpenPopUpPage('/sites/SiteName/Lists/ListName/newform.aspx?ContentTypeID=0x01002069B8F8E3CC074DB7793638F1D8896B’)


My example has the syntax to link directly to that content type's newform, rather than just using the newform.aspx which links to the default Content Type.

Cheers!

Dan

No comments:

Post a Comment