Hide button in ribbon

Home Forums Classic DFFS Hide button in ribbon

Viewing 1 reply thread
  • Author
    Posts
    • #10763
      chgrnet
      Participant

        Some time ago you gave me some code that allowed me to hide custom action buttons in the ribbon. I am trying to make this work for hiding the “Attach File” icon in the ribbon. Will this code, when customized, work to hide this icon?

        function hideAttachFile(){
        spjs.$(“#\\{0293A6EF-6B2D-4C81-B992-69163627AB55\\}-Large”).hide();
        }

        Here is the info for the icon (not sure which one to use, if any):
        Ribbon.ListForm.Edit.Actions-LargeLarge-0-0
        Ribbon.ListForm.Edit.Actions.AttachFile-Large
        Ribbon.ListForm.Edit.Actions

      • #10824
        Alexander Bautz
        Keymaster

          I tested with this in the dev console:

          $("#Ribbon\\.ListForm\\.Edit\\.Actions\\.AttachFile-Large").hide();

          It will hide the button in my test (on office 365).

          You might need to delay the execution of the code line until the ribbon has finished loading, but putting it in the custom js should do the trick.

          Alexander

          • #10852
            chgrnet
            Participant

              Thank you! This worked as expected. I did not put a delay in, but if I see any inconsistent behavior, I will check into this.

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