Home

SharePoint IT Pro Blog

MSDN Magazine Feed

Tuesday, October 6, 2009

How to hide Meeting Workspace Option in SharePoint Calendar

Use content Editor Webpart and copy following code into source editor, and add this web part to your Calendar's New Item Page [NewForm.aspx]

< type="text/javascript">
var TDs = document.getElementsByTagName("TD");
var i=0;
var tagContent = "";
while (i <>
{
try{tagContent = TDs[i].innerText TDs[i].textContent;
if (tagContent.indexOf("Workspace") == 0 tagContent.indexOf("Workspace") == 3)
{
TDs[i+1].parentNode.removeChild(TDs[i+1]);
TDs[i].parentNode.removeChild(TDs[i]);
}
}
catch(err){}i=i+1;
}
< /script >

1 comment:

Unknown said...

You should also place this CEWP in the dispform.aspx and editform.aspx to hide it when the normal user open the item and when the contributor wants to edit the item.
- Aniket