tags:

views:

24

answers:

1

Hi,

I'm building a bulletin board site (in 2010) and I'm sure this must be simple but again it doesn't seem so. Anyway on my default page I have a query webpart showing the latest items and what I need is just a button at the top of the page "Add new item" which would show the popup and allow users to complete the form just like it works on the display list items form.

I've looked at AllItems.aspx but can't even see the "Add new item" button to copy!

Any ideas?

Thanks

Dan

A: 

How complicated is your query? If the query is only pulling from one list, you could put the filters into a view in the list and replace your query webpart with a List View Web Part (in the browser, select the webpart named after your list). In the List View Web Part properties, switch to your new view. By default, a List View Web Part includes an Add New Item link.

Now, it's a link and not a button. And it's in the footer of the webpart, not at the the top. If you really need a button at the top of the page, you could add a Content Editor Web Part and insert HTML for your own button. You should be able to reuse the Add New Item URL from AllItems.aspx. The URL should look something like this: http://mysite/_layouts/listform.aspx?PageType=8&ListId={21AA3D96-75EE-45CC-A153-D0FA7856DE67}&RootFolder=

Rich Bennema
Using the link url at the bottom of the page didn't work so in the end I had to just add a fill form webpart at the top of the page with some jquery to hideshow.
ifunky
That's correct. The link is only an example, thus "should look something like this." It does not point to a real website and will not work. It's intent was to illustrate the pattern of the Add New Item URL so that you knew that you had the correct one.
Rich Bennema