1. Make sure that the Metadata Navigation and Filtering site feature is enabled.
2. Navigate to and edit the page you are adding this to.
3. Insert a Script Editor web part and embed the following code (no changes need to be made, just copy/paste):
4. Click OK and save the page.
5. Confirm that the edit form pops up when you drag and drop documents.
FIXED (line 73): Thank you for pointing this out Alison N!
30 thoughts on “Edit Form Popup – Drag And Drop”
The js function works fine in the root of a library but when you create a folder it doesn’t work there. is there any solution ?
Hm. This works in folders for me. Couple of questions: What version of SharePoint are you on? Which page are you adding the js to? The pop up happens at the root level but not when you click into a folder and drag and drop there? Do you have the Managed Metadata site feature enabled?
I’ll keep trying to replicate and will update you if I find anything!
I used the code in sharepoint 2013, first i enabled the managed metadata feature in site level, then I added the js code in master page and when i saw the problem with folders, i tried using the code in snippet webpart , but i got the same result . the code works when i drag and drop files in the root of the libraray but when i create a folder and drag&drop files in the folder, the page is just reloded and nothing happens.
I’ll follow the same steps to see if I can replicate.
I’ve always just added the js to a script editor web part on the page with the library web part. I haven’t tried adding it directly to the master page.
I’ll update with results soon!
I could find out why the code didn’t work in folders. It was because of view scope in the caml query that was defined in the code. you can simply replace caml += “” line with caml += “” and the code runs in all folders
the js code dosn’t work in folders. please help
just set view scope to recursive
Can someone please give the correct example of how to make this work in folders? I note Eli above mentions replacing a caml line, but the comment does not contain enough detail to work out what s/he means. And again Eli answers “just set view scope to recursive”, but how do we do this? Can someone step me through it please
Line 72 (which I updated in the code above). Replace:
I’m in Sharepoint Online and it’s not working for me. Any advice?
When I drag and drop the status bar comes up but no metadata window.
thanks , for very useful post , i worked for me .always i hope for you the best
Hello thank you very much!
Is it a problem if there are several of the same library’s app part, with different views, on the page where this script is placed? I just tried this, following each step exactly, and the edit form did not pop up. This is in SharePoint 2013 on prem.
Please disregard my previous comment – I created a new page with only one library app part and it still did not work. Now I wonder if it’s because we use Nintex Forms, not the default SharePoint forms. Do I need to change ‘DefaultEditFormUrl’ in line 155 to something else?
I really appreciate this post. I’ve been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thanks again
Can someone please help. I am using SharePoint 2016. I added the script in Script editor and activated the feature but i drag and drop, nothing happens, the pop up doesn’t come up.
can you please advise?
I don’t have 2016 but I’ll do some research and get back to you asap!
thanks. looking forward to hear from you.
I have added the script and activated the feature but when i drag and drop, the pop up doesnt open, the document is uploaded with being checkout to me.
can you please advise?
Mine did not work at first either, but I debugged it and the line 73 should read:
caml += “”;
The change is putting single quotes around Recursive All rather than the double quotes.
Thanks for this code snippet, very useful!
For some reason the copy past was wrong?
caml += “”;
Thank you, Alison!
This is ridiculous… I typed it out and did not copy paste and for some reason the site is not allowing me to enter the change…. hopefully you can fix that.
Thanks for the snippet and the great help here.
For me, it only worked, when I change line 73 – Instead of “RecursiveAll” just “Recursive”
Thank you for this. This solved my problem. Such great article.
I am using Sharepoint 2016 and for me the script works in the root library but also does not work with folders using the current version of the script. Page is just reloading.
Any idea why this might be the case? I have applied the script to the page of the view which shows folders directly.
My library is using customized folder content type with activated title – can this be the reason?
This works great, except that I placed the code in the view page for the All Items view, and it seems to have removed my ability to access the library settings. Help?
Hrmm, I’m using this in SharePoint 2013 and, as discussed, it’s working in a direct view of the document library but not working when in a subfolder (despite RecursiveAll) and not on a document library that’s on a page with other webparts I built.
Does it have to be implemented in the master page? I’m using code snippet parts.
First this script is awesome!
But I need a little more…
Is there a way to capture the element that the drop is performed? I have a Web Part page that has multiple “drop zones.” If I can capture the element where the drop occurs, I can set one of the documents properties programmatically.
The code worked 1/10 with folder amd 100% without folder