Only show Close button on toolbar

Hello,

I need to hide the EDIT and PDF buttons/links on a Display item form. Just need the CLOSE button. Can you provide code to do that? Running sample code from documentation don't seem to be working as expected.

thank you

Dear @Pandra,
Try the following JavaScript code to hide Edit and PDF button:

fd.spRendered(function(){
    fd.toolbar.buttons.splice(0,1);
    fd.toolbar.buttons.splice(1,1);
});