Hide button in ribbon
- This topic has 2 replies, 2 voices, and was last updated 10 years, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Hide button in ribbon
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
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
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.