When you create a new document set, you are presented with a modal dialog such as the following:

alt text

I want to have this kind of "New Form" (modal) for my custom content type (with custom form).

Now, I know that I can create my own modal dialogs using the Javascript API (e.g. http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx). Also there is the NewFormUrl property for a content type, where I can redirect the user upon creating a new item from my content type ( http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontenttype.newformurl.aspx) - this is not the same, because I think it is nicer to stay on the same page.

I still don't know how I would get Javascript to fire upon creating a new item from my content type, so I could call the modal dialog api. What I basically want is this:

New > MyContentType > User is presented with a form as in the Screenshot above > User enters some metadata > Item based on MyContentType is created with metadata entered by user.

Also when creating my own content type new form, would I need to recreate everything Microsoft has done so nicely for the Document Set (i.e. Save Button, Check-In, Copy/Paste)?

EDIT: And then there is that: How to Open a List Form in a Modal Dialog Box

2 Answers 2


You should not have to worry about how the dialog launches, it should happen seamlessly from the ribbon new button no matter the content type. I would check two things:

  1. Is the site operating with v4 (sp2010) visual styles?

  2. Is the list configured to show forms in a dialog.

List Settings -> Advanced -> Dialogs -> Launch forms in a dialog? -> Yes

The list forms, NewForm.aspx, DispForm.aspx, EditForm.aspx are all full pages with master page wrappers and everything. SharePoint 2010 magic happens when "Launch forms in a dialog?" is turned on, and only the content of the form is displayed in the dialog.


try this

New Item:

javascript:EditItem2(event,"/_layouts/listform.aspx?ListId={YOUR_LIST_ID} &RootFolder=YOUR_ROOT_FOLDER &ContentTypeId=ITEM_CONTENTTYPE_ID");

but check this out http://tuan-tomy.blogspot.com/2010/09/redirect-to-link-to-new-item-with.html

  • please add more data than just a link. Links tend to be short lived, so to keep the value of the answer in this site you should paste in the goodies from the link and then keep the link for further details. Thanx Jun 9, 2011 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.