How To Hide Controls in Newitem,Edit and disp form of List in Sharepoint

Hi Guys,

here is the javascript to hide controls in New/edit/disp forms in sharepoint.
function findacontrol(FieldName) {
var arr = document.getelementByTagName(“!”);
for(var i=0;i

if(arr[i].innerhtml.indexof(FieldName) > 0 ) {
return arr[i];

function hideFields() {    

var control = findacontrol("Device Name");"none";   
control = findacontrol("Comments");"none"; 
control = findacontrol("Options");"none"; }


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s