Redirect on customised document set form


Badge +16

Standard SharePoint document set form, once saved to create a new document set, user is redirected to the newly created document set.

Document set form customised with Nintex Form doesn't do this.  Instead it redirects user back to the library, where they then need to find the newly created document set and navigate to it (causing an extra click).  This isn't acceptable to my customer - anyone know how I can easily overcome this?

Euan Gamble‌ did this come up in Document Set forms testing?


10 replies

Userlevel 5
Badge +13

Hi Cassy Freeman‌, 

Thanks for the feedback. I will chat to the development team.

Cheers,

Euan

Badge

Any update on this topic?

Badge

Hi, 

I'm facing the same exact problème. Any updates about this?

Regards!

 

Badge

Hi, 

I found a solution to this problem :

NWF$(document).ready(function () {
    NWF.FormFiller.Events.RegisterAfterReady(function () {
        var button = NWF$('.saveButton');
        button.removeAttr("onclick");
        button.click(function () {
            var listUrl = _spPageContextInfo.listUrl;
            var listName = "Customer Contract";
            var parameter = "itemStatus";
            var value = "new";
            var elementName = NWF$('.saveButton').last().attr('name');
            var aspForm = NWF$("form[id=aspnetForm]");
            var oldPostbackUrl = aspForm.get(0).action;
            var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl);
            var dsName = NWF$('#' + calcName).val();// the name of your document set
            var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, listUrl + "/" + dsName);
            if (!PreSaveItem()) return false;
            WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true));
        });
    });
});
Badge +1

@bekri Where would that code go? And does it work on both Responsive and Classic Forms?

Badge

Hi @smarano

This code goes in a custom javascript that you have to reference in your form "form settings".

I didn't try it for responsive but it's Javascript there is no reason it will not work.

 

Let me know if you need more details

Userlevel 5
Badge +14

Responsive Forms removed all support for JavaScript, and while you technically still *can* get it working inside of that form type, it is not and will never be supported by Nintex and is also rather advanced in terms of knowing JS. 

For Classic Forms however, you should be absolutely fine to go! 

Badge +3

Any update for this for Responsive Forms? Having the same issue.

Badge

Hi Euan, Could you please let us know if you have any update on this for Old responsive forms on Office 365? We have the same issue. I tried to use Form variables to redirect on "Save" button, but there is no reference available to add Form variables. Could you please fix this?

Badge +2

Any update on this? I don’t want users to have to search through a library of hundreds of doc sets to find the one they just created. Not using a Nintex form is the only option if I want to make sure a user is directed inside the newly created doc set upon saving. 

Reply