Skip to main content
Nintex Community Menu Bar

Hide delete button

  • February 25, 2016
  • 5 replies
  • 65 views

Forum|alt.badge.img+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

Forum|alt.badge.img+9
  • February 25, 2016

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?


Forum|alt.badge.img+11
  • Scholar
  • February 25, 2016

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

Hide the Pesky Delete List Item button in the Ribbon


Forum|alt.badge.img+11
  • February 25, 2016

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


Forum|alt.badge.img+5
  • Author
  • February 25, 2016

CSS worked like a charm...Thanks Shaunlub.


Forum|alt.badge.img+5
  • Author
  • February 25, 2016

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