0

I have a custom form where users have an option to upload attachments to a list item. This works without issue, however, I would prefer if I could use ASP in the HTML to embed the SP attach file dialog in my modal that pops up rather than have my modal popup, have them press an "Upload File" button and then have the SP modal dialog popup.

Is there simply a way to have this SP modal dialog embedded into my modal itself so I can do away with the need to click to display SP dialog modal? enter image description here

So basically what I want is the content of the SP Dialog modal to be displayed in my modal and replace the Upload New File button so when they pop up this modal they simply have to click the browse button, find the file and then click OK or cancel without having to open another modal.

Is this possible?

UPDATE: enter image description here

OK, I was able to load the page into a div using jQuery---had to wrap it in a $(document).ready() function to get it to work, but same problem...it's loading the entire page, when I just want the small part that pops up into the modal that it brings back...any help?

0

The SharePoint Attach Dialog is basically loading the file _layouts/15/AttachFile.aspx

And I don't think you can embed this into a div. Probably you can try loading it into an Iframe and pass the List and ItemId so it will attach files to the correct list item.

  • it's saying I should be able to use jQuery to do it via: <div id="dialog"></div> and then in the script $('#dialog').load(url); where url is the sharepoint attach file address... It doesn't work tho... – MattE Oct 27 '17 at 17:37
  • I can get it load in an Iframe but it's loading the entire page...I just want the part that loads in the modal itself when it pops up... – MattE Oct 27 '17 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.