Hide delete button

  • 25 February 2016
  • 5 replies
  • 19 views

Badge +5

Hi All

I am trying to hide the actions menu and delete button from the ribbon. I am usng the JS below which works fine when I try it in browser console but does not work when I add this to Nintex form custom JS section. Any idea why this would not work and also if there is another way to hide these buttons/sections?

NWF$(document).ready(function(){

var hidedel=document.getElementById("Ribbon.ListForm.Display.Manage.DeleteItem-Medium");

hidedel.style.display="none";

var abc=document.getElementById("Ribbon.ListForm.Edit.Commit.Cancel-Large");

abc.style.display="none";

var hideactions=document.getElementById("Ribbon.ListForm.Display.Actions");

hideactions.style.display="none";  

});

Thanks


5 replies

Badge +9

Your solution does not prevent to delete an item in list view.

Why not creating an own permission level for list where delete item is not allowed?

Badge +11

I would recommend you use CSS - see my entry here:

Hide the Pesky Delete List Item button in the Ribbon

Badge +11

Why not just take the permissions away to delete. It won't allow them to delete.

Badge +5

CSS worked like a charm...Thanks Shaunlub.

Badge +5

I have removed the delete permission but also wanted to hide the button.

Reply