Sushmita05
Design Dabbler

Create a pop-up on Nintex form to display document library

Hi,

I am new to SharePoint development. We have a requirement that needs a form with a button to open a pop-up. The pop-up window must display the document library from which a user can choose documents and attach them to the form, just like how the 'Attachments' button works for local files. I would like to know if this can be achieved using JavaScript. We are using SharePoint 2013 on-prem.

 

Any help would be appreciated.

Thanks!

0 Kudos
Reply
6 Replies
schetti92
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

Hi,
You need to use custom javascript action

  • Crate a new Custom JavaScript button.
  • Go to Control Settings of button and add the following (replace the title and URL)
function redirectToNewForm(){
var options = {
title: "Your Title",
url: 'http://mysite/sites/page.aspx',
dialogReturnValueCallback:Function.createDelegate(null, portal_modalDialogClosedCallback)};
SP.UI.ModalDialog.showModalDialog(options);
}

Regards

Shashika

0 Kudos
Reply
Sushmita05
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

Thanks, how can I make it work like 'Attachments' control? I want to have the ability to select documents from the pop-up and add them to the form item. Just like how 'Attachments' control works for browsing and attaching documents from PC.
0 Kudos
Reply
schetti92
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

Are you referring to something like below ? If so you need to pass a parameter to your document library from the javascript

UploadAttach.gif

 

0 Kudos
Reply
Sushmita05
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

Yes, exactly this. Here the control opens a dialog to browse files on the computer, similarly I am looking to implement the ability to open files in the Sharepoint library. Can you please elaborate on the solution that you mentioned. TIA

0 Kudos
Reply
Sushmita05
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

@schetti92  Also, can you please tell me how we can display the chosen files in a tabular form, like how you have it in the

Screen Shot 2020-09-03 at 10.11.30 AM.png

screenshot attached. 

0 Kudos
Reply
schetti92
Design Dabbler

Re: Create a pop-up on Nintex form to display document library

@Sushmita05, You need to insert "List View" Control and add the filtering options. 

schetti92_0-1599206229233.png

Note : Modify your view to show/hide columns

Reply