Here we will discuss how we can hide the “Replace It” button from the “A file with the same name already exists” dialog box in SharePoint Online Office 365 site. If you are adding any document to a document library which already exists then it will show a dialog box with two buttons like “Replace It” and “Don’t Upload”. Here our requirement was to hide Replace It button so that no one can replace a file which already exists. The dialog box looks like below:
Also, you can check:
– How to deploy WebJob to Microsoft Azure using Upload zip file method in SharePoint Online?
We can hide button by using css.
Edit the page and add a script editor web part to the page. Add the above code and Save the page.
Now when you will try to upload a file which is already exists, it will display the dialog box which will have “Don’t Upload button” like below:
Hope this will be helpful.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials: