Tuesday, February 16, 2010

Hide Delete Item Option in Form Toolbar of Custom List Form using SPD

To Hide the Delete Item option from the Form Toolbar using Javascript in SPD, use the following javascript function

function HideDeleteItem()
var aList=document.getElementsByTagName("a");
for(i=0;i {
if(aList[i].innerHTML=="Delete Item")

This can also be achieved using jQuery.

$(document).ready(function() {
$(”a[title='Delete Item']“).parent().parent().parent().hide();

The advantage of using this jQuery is that it also hides the separator whereas the other normal function doesn't help to achieve this.


  1. it hides the button , but it appears for a brief period of time when the page loads... can we stop that?

  2. I think the easiest way to do -
    Open SPD > EditForm.aspx > in code find standard toolbar webpart code > Make the Control Mode to "New" which will get rid of "Delete Item"