Skip to main content

How to hide recurrence fields from Calender list using javascript


Put following code in the content Editor webpart of EditForm.aspx, NewForm.aspx and DispForm.aspx to hide "All Day Event, Recurrence and Workspace columns "



/*
  Detail: This code is to hide all three fields - 'All Day Event','Recurrence','Workspace' from the form
*/
_spBodyOnLoadFunctionNames.push("hideall()");
function hideall()
{
HideField("All Day Event");
HideField("Recurrence");
HideField("Workspace");
HideField("Is Active");
}
function HideField(title){
var header_h3=document.getElementsByTagName("h3") ;
for(var i = 0; i {
    var el = header_h3[i];
    var foundField ;
   if(el.className=="ms-standardheader")
    {
        for(var j=0; j        {
            if(el.childNodes[j].innerHTML == title || el.childNodes[j].nodeValue == title)
            {
                var elRow = el.parentNode.parentNode ;
                elRow.style.display = "none"; //and hide the row
                foundField = true ;
                break;
            }
        }      
    }
    if(foundField)
        break ;
}
}

Comments

Popular posts from this blog

SharePoint 2010 Branding: Change site actions and welcome menu arrows

Here's how you can do it. Hide the image and give our custom image element a background image. Look Like: .ms-viewselector-arrow {     background: transparent url('/PublishingImages/images/Arrow.png') no-repeat scroll 0 0;     height: 4px; /* height of the image */     width: 5px; /* width of the image */ } .ms-viewselector-arrow img {     display: none; }