I want to change the behavior of the document library upload form i.e. it should appear unchecked when the user uploads the document in library.
I searched over the internet and found this which seems useful as per my need.
I opened the site in the SharePoint designer and edited default.master
master page put the script but not working in my case.
Script is as below under the <Head>
section :
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function()
{
var form = $('form');
if ( form.attr('action').indexOf('E2290DED-2B70-4B33-B3A3-97809B209551') > -1 )
{
var checkbox = $('#ctl00_PlaceHolderMain_UploadDocumentSection_ctl03_OverwriteSingle');
checkbox.prop('checked',false);
checkbox.parent().hide();
var multiple = $('#ctl00_PlaceHolderMain_UploadDocumentSection_ctl03_UploadMultipleLink');
multiple.hide();
}
}
);
</script>
What should I do to accomplish this?
Please help.