How to remove or hide Replace It button from file upload dialog box in SharePoint online?

How to remove or hide Replace It button from file upload dialog box in SharePoint 2019?
InfoPath alternatives for form designing SharePoint

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 is 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 is already exists. The dialog box looks like below:

 How to remove or hide Replace It button from file upload dialog box in SharePoint online?
How to remove or hide Replace It button from file upload dialog box in SharePoint online?

Also you can check:
– How to deploy WebJob to Microsoft Azure using Upload zip file method in SharePoint Online?

– SharePoint Online Site Workflow and Initiation Form Parameters example using SharePoint designer workflow

– How to use JavaScript in Nintex forms for Office 365?

Solution:
We can hide button by using css.

<style type=”text/css”>
#ms-conflictDlgReplaceBtn {
display:none;
}
</style>

Edit the page and add a script editor web part to the page. Add the above code and Save the page.

 

 How to remove or hide Replace It button from file upload dialog box in SharePoint 2013?
How to remove or hide Replace It button from file upload dialog box in SharePoint 2013?

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:

 How to remove or hide Replace It button from file upload dialog box in SharePoint 2019?
How to remove or hide Replace It button from file upload dialog box in SharePoint 2019?

Hope this will be helpful.

Similar SharePoint 2013 Tutorials

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply