How to remove the Delete option from attachments

Home Forums General discussion How to remove the Delete option from attachments

Viewing 1 reply thread
  • Author
    Posts
    • #33129
      Lara Salvador
      Participant

        Hello Alex, How are you? I hope you are doing well.

        I have a doubt about how can I remove the delete option from an attachment.Is this posible?
        Thanks in advance

        Attachments:
      • #33132
        Alexander Bautz
        Keymaster

          Hi,
          If you right click the element you want to remove and select “Inspect” it opens the developer tools and you can see if it has an id or class you can use to select it. In this case the element you want to remove has the class “ms-propertysheet” and you can add this to your Custom CSS in EditForm to hide the delete button:

          /* Hide delete attachment button */
          .ms-formbody .ms-propertysheet{
              display:none;
          }

          Because the class might be used in other places as well I have included the ms-formbody class in the selector to only hide ms-propertysheet when it is inside an element with class ms-formbody.

          Alexander

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.