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 >
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;
}
1 comment:
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
Post a Comment