Pages

Tuesday, August 9, 2011

SharePoint 2010: Change the “Add New Item” (and other) messages for a all SharePoint List Types

In SharePoint, to add a new item/document we always have one standard message like “Add a new item”.

Users who are familiar with SharePoint they are used to understand but sometimes users do not understand they have question why I it always has said “ Add a new item”. So to avoid confusion let us add user friendly message.

How to do that? Let us use power of javascript.

Steps:

1. Add a content editor webpart in the page and add this javascript. Add Content Editor Webpart at the end of the page after list.

2. “<script> document.getElementById("idHomePageNewItem").innerHTML="Click here to insert a new country"</script>
This is just the text message for SharePoint Custom List how to make change for each type of list.

Below is list for id for every SharePoint list type.

ID’s used by web parts
SharePoint List Type
Default message
ID for “.getElementById” in the code below
Announcements
Add new announcement
“idHomePageNewAnnouncement” (changed in 2010)
Links
Add new link
"idHomePageNewLink" 
Calendar
Add new event
"idHomePageNewEvent"
Picture Library
Add new picture
“idHomePageNewItem”  *  (changed in 2010)
KPI List
Add new item
"idHomePageNewItem"  *  (changed in 2010)
Tasks
Add new item
"idHomePageNewItem"  *  (changed in 2010)
Project Tasks
Add new item
"idHomePageNewItem"  *  (changed in 2010)
Document Library
Add new document
"idHomePageNewDocument" 
Wiki
Add new Wiki page
"idHomePageNewWikiPage"  
Discussion
Add new discussion
"idHomePageNewDiscussion" 
Custom List
Add new item
“idHomePageNewItem”

Hope this helps!!!
Disha Shah

No comments:

Post a Comment