Friday, June 28, 2013

How to bypass Edit Properties Page or Skip EditForm.aspx Page while uploading documents in a document library

How to bypass Edit Properties Page while uploading documents in a document library(or)
Skip EditForm.aspx while uploading documents to document library in SharePoint 2010.

1.       Append this to the end of the URL for .aspx URL:   &ToolPaneView=2   and press Enter 

YourSiteName – Name of your Site DNS Name or Server Name
YourListName – Name of list or document library Name
YourFormName – Name of the form (page) name

2.  Click Add a Web Part and add a Content Editor Web Part

3.  Move the Content Editor Web Part below the list web part
Edit the web part and click the Source Editor button

Add the following...

<script type="text/javascript">
function GetQueryStringArgs()
{
    //fetch querystring and remove first ?
    var qs=(location.search.length>0?location.search.substring(1):"");
    //create an object for saving data
    var args={};
    var items=qs.split("&");
    var item=null,
        name=null,
        value=null;
    //add to args object one by one
    for(var i=0;i<items.length;i++)
   {
        item=items[i].split("=");
        name=decodeURIComponent(item [0]);
        value=decodeURIComponent(item[1]);
        args[name]=value ;
     }
        return args ;
    }
var args=GetQueryStringArgs();
var urlReferrer=document.referrer.toString ();
if(urlReferrer.indexOf("Upload")!=-1)
{
    window.frameElement.commitPopup();
}
</script>

Reference:

1 comment:

  1. following option is better - http://ratikantas.blogspot.com/2012/07/skip-edititem.html

    ReplyDelete