Search This Blog

Monday, May 6, 2013

Customize Sharepoint 2010 Editform.aspx

Add the following code through sharepoint designer Or CEW. Below peiece of code is hiding the columns in edit form......................





 _spBodyOnLoadFunctionNames.push("hideRows");
 function hideRows()
 {
  var pageTables = document.getElementsByTagName('table');
        var cName = null;
        var formTables = null;
        for(var i=0; i < pageTables.length; i++){
         cName = pageTables[i].className;
            if (cName == "ms-formtable"){
             formTables = pageTables[i];
            }
        }
            var rows = formTables.rows;
            rows[rows.length-2].style.display = "none";
            rows[rows.length-3].style.display = "none";
            rows[rows.length-1].style.display = "none";
            rows[rows.length-4].style.display = "none";   
            rows[rows.length-5].style.display = "none";
              
 }


No comments:

Post a Comment