Share via


How can I move the add new item to the top of my sharepoint list

Question

Saturday, February 16, 2013 12:57 AM

How can I move the "add new item" to the top of my sharepoint list.  We have a lot of entries and they have to page all the way to the bottom to add a new item every time.

Cletus51

All replies (8)

Saturday, February 16, 2013 5:05 AM âś…Answered | 2 votes

Unfortunately you can't move the "Add New Item" link to the top of the OOBT list view web part.

An alternative approach is to add a Content Editor Web Part (CEWP) on top of the list view web part with the following HTML source. (assuming the list name = "custom")

<a onclick='NewItem2(event, "/Lists/custom/NewForm.aspx"); return false;' href="javascript://">Add new item</a>

Allen Wang | http://blogs.msdn.com/allenwang


Saturday, February 16, 2013 6:06 AM

This worked perfectly...thanks!

Cletus51


Tuesday, November 5, 2013 3:38 PM

Can you please provide a bit more detailed instructions on how to accomplish this?

Thank you,

Raffi


Wednesday, November 6, 2013 5:36 AM | 3 votes

After adding the Content Editor Web Part:

  1. Click on "Click here to add new content".
  2. Go to "Editing Tools" tab --> "Format Text" tab --> "Markup" Section --> "HTML" drop down --> click "Edit HTML Source".
  3. In the pop-up window include the HTML code.

I had to modify the code to the following to get it to work on my page.

<a onclick="javascript:NewItem2(event, &quot;http://server/site/Lists/List Name/NewForm.aspx&quot;); javascript:return false;" href="javascript://">Add new item</a>

The link had to be a fully qualified link for me, or at least once it worked I stopped trying to figure it out.

I also added the following before this to include the "+" sign that is shown at the bottom of the page.

<span style="; width: 10px; display: inline-block; height: 10px; overflow: hidden"><img alt=":" src="/_layouts/images/fgimg.png" style="; border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; top: -128px !important; left: 0px !important"/></span>

Bryan


Saturday, July 12, 2014 9:42 PM

You can move the "Add new item" link... http://techtrainingnotes.blogspot.ca/2012/01/sharepoint-move-add-new-link-to-top-of.html

Mike Smith TechTrainingNotes.blogspot.com
Books: SharePoint 2007 2010 Customization for the Site Owner, SharePoint 2010 Security for the Site Owner


Wednesday, February 8, 2017 9:57 PM

Where do you locate this addressor find this info in SharePoint?: http://server/site/Lists/List Name/NewForm.aspx&quot

Or do you just substitute the list name and server?


Thursday, August 17, 2017 4:24 PM

Hi, Bryan.

I want to be able to redirect to a particular page after the item is added instead of the default behavior where it takes the user to allitems.aspx page. How can i do that ?

I'm using sharepoint 2013


Monday, May 6, 2019 6:21 PM

Thanks a ton. I wouldn't have figured this out with just the top answer.