cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Automation Master
Automation Master

Redirect on customised document set form

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?

Labels: (2)
Reply
8 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Redirect on customised document set form

Hi Cassy Freeman‌, 

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

Cheers,

Euan

Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

Any update on this topic?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

Hi, 

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

Regards!

 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

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));
        });
    });
});
Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

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

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

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

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Redirect on customised document set form

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! 

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Redirect on customised document set form

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

0 Kudos
Reply