Jul 20 2023 02:48 AM - edited Jul 20 2023 02:50 AM
Hi All,
Based on project requirement, we are using custom forms while uploading documents in SharePoint Online site using SPFx. However the drag and drop feature directly uploads the document, without loading the custom form. We are looking for 2 solutions if possible:
1. How can we disable the drag drop feature in sharepoint online. Is it possible with spfx or any other workaround?
2. If a document is drag dropped, our custom form should load immediately after uploading the document, so that the purpose of creating the custom form will be served. Can this be achieved in any way..?
Any lead will be helpful.
Jul 20 2023 05:11 AM - edited Jul 20 2023 05:49 AM
About 2. This is not trivial. Using SPFx you can inject JavaScript logic into the page and then try to detect changes and show the custom form when documents are being uploaded. Another approach is to use Power Automate.
Making this solution 100% reliable is going to be a challenge. Does your form also show when users click the Upload button or upload 10's of documents or a folder structure? or when they use OneDrive for Business client or apps on mobile devices? Do you also need to cater for documents being added to the library via Cop (or Move) from other libraries?
Jul 20 2023 05:42 AM