cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Nintex forms custom button submit AND redirect


I have a form that I want to use the standard thank you page redirect if the user selects the canned "Save" button.

I also have a custom button that would "save" the current form contents (NewForm.aspx)  and redirect the user to a fresh form to enter another item.

I am having a great deal of difficulty figuring out the javascript to submit and redirect to NewForm.aspx ,  redirect works but submit is not working ....

$(this.form).submit()

window.location.replace("https://************************/sites/SupportRequest/NewForm.aspx");

Reply
24 Replies
Workflow Hero

Re: Nintex forms custom button submit AND redirect

If you are using the jQuery library that comes with NF you would need to change your namespace to NWF$ rather than just $ . This blog post briefly talks about it http://sharepointpapers.blogspot.com.au/2013/08/nintex-forms-with-spservices-library.html?m=1

Sent from my Windows Phone

Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

I was actually using just the normal jquery out on google, do I
need to use the nintex version? Is it available on the Nintex site for download?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

It's preloaded with the form. You just reference it by another name.

Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

Looks like there might be synchronization issues. Submit is asynchronous, I believe, so when you do the location.replace() you don't give it a chance to complete. Do the redirect only in a callback that should fire after the submit status changes. I don't have all the details on how to do this and whether it's feasible without wrapping OOTB submit into another function, but you should get the idea.

Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

I cannot get a submit to work by itself....

NWF$(theForm).submit()  Does not work

NWF$(this.form).submit()  Does not work

NWF$(document.aspnetForm).submit()  does not work

Straight JavaScript :

document.getElementById("aspnetForm").submit()  does not work  does not work....

What am I missing ?

Accept as Solution Reply
Not applicable

Re: Nintex forms custom button submit AND redirect

I afraid you can't do it by this way, like Alexey Krasheninnikov explained.

Probably you can make use of Source URL Parameter for redirection. Refer to this: Redirect Users to Thank You page from NewForm.aspx after form submission | Salaudeen Rajack's ShareP...

Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

Yeah I just use a combination of the Source parameter in the link provided to end users and the Redirect URL in form settings, this takes care of both Submit and Cancel.

Accept as Solution Reply
Not applicable

Re: Nintex forms custom button submit AND redirect

Just know that you can put in a redirect URL by going to Settings > Advanced within the Form Designer, and then typing in the Redirect URL that you want the form to visit upon being submitted.

Hope helps!

Accept as Solution Reply
Workflow Hero

Re: Nintex forms custom button submit AND redirect

Ok after a lot of soul searching and my Nintex friends unable to help me,  here is what I did to work around this.

Created a web page as a "thank you for your submission" page and used the redirect function in the Nintex form editor (under advanced) and then on the resulting thank you page I put two buttons, one opens a fresh form and the other sends to you a "thank you, your submissions are complete"

0 Kudos
Accept as Solution Reply