11

How can we show a List Form/New Item Form (/servername/site/Lists/listname/NewForm.aspx?) as a web part in a SharePoint 2010 page?

Adding a list web part obviously only shows the list items/views. I noticed an "HTML Form Web Part" but that also seems to not be what I'm looking for. "Page Viewer" web part might seem like a workaround but it displays the entire page with menus and everything which doesn't fit the form inside the web part nicely.

3 Answers 3

10

So it turns out that SharePoint Designer is the only way to accomplish this. You have to go into the page in Designer, edit the page, and select the Insert tab from the ribbon -> New Item Form -> select "CUSTOM LIST FORM..." (not one of the pre-populated lists or you will get the barebones default content type!) -> Choose the list for the form you want to show and the content type, click OK -> Save the page in SP Designer and it will now show on the page embedded as a form. Success!

4
  • 1
    Just found this useful for my work. Have a +1 Jan 31, 2014 at 11:23
  • Alex, have you worked with Page Layouts? Do you know a way to this but in a Page Layout associated with a Content Type, it's not available that option and have tried different ways with code snippets but not luck Feb 18, 2014 at 2:59
  • Hi Mr., sorry I haven't done much with Page Layouts. I'd say create a new question on SE :) Good luck!
    – Alex
    Mar 26, 2014 at 2:19
  • I have created and dropped the form on my page, when I save entries are saved in list but form doesn't show any message, Can I show success message on the form when user hit save?
    – Ali
    Jul 1, 2014 at 3:34
7

What if you just add ?IsDlg=1 to your link in the page viewer, then it will remove most of the "UI".

/servername/site/Lists/listname/NewForm.aspx?IsDlg=1
4
  • That had no effect whatsoever :) Thanks though, I was able to figure it out using a different method.
    – Alex
    Jun 11, 2013 at 18:52
  • Strange, it should display the same as inside a modal dialog. But looks like you found your answer anyway :) Jun 17, 2013 at 5:21
  • I used IsDlg=1 before to very much shame. I wrote about it here: mazdev.blogspot.ae/2014/06/… The important thing to note is that the links to which the "dialog" links to, will not be in "dialog" mode! The consequences explained in the linked article. Otherwise, this would be a good suggestion
    – Lzh
    Jul 31, 2014 at 7:29
  • So I cannot upvote and the answer from Anders is correct. if you place your urls like this server/site/newform.aspx?IsDlg1 into a page viewer it works. I then had to throw a little CSS to hide a few things but that answer is correct. Jul 16, 2015 at 21:45
1

SharePoint 365 changes things I've noticed. Using Anders trick exactly only showed the ribbon row (save/edit toolbar). To get the whole form I had to use all lowercase as such:

/servername/site/Lists/listname/NewForm.aspx?isdlg=1

...then the remainder of the form appeared. I also had to set a specific height on the Page Viewer web part but that may be due to my page template.

I ended up using a form dialog pop-up instead using the following:

https://domain.sharepoint.com/sites/sitename/ListName/NewForm.aspx');">Dialog Form Link

That keeps the page shorter and is more accessible.

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.