SShaffer2
Forms Fledgling

Redirect Submit or Cancel Button to Previous Site (New Responsive Form)

I'd like to Redirect the user to the previous page they came from after clicking the Submit or Cancel button.  I found a post  that explains how to do this by creating a function (doRedirect(){history.go(-1);}) in Java, but is this option available in the Responsive form?  If so, where do I find it?

 

Or, is there another way to redirect the user to the previous page they came from?

Thank you.

0 Kudos
Reply
4 Replies
satishkumar529
Design Dabbler

Re: Redirect Submit or Cancel Button to Previous Site (New Responsive Form)

1. you can use 'Redirect to URL' property available for the button settings. 

2. If you are adding a link to the form anywhere, you can use source parameter of the url

     ex: http://xyz.com/lists/test/newform.aspx?source=RedirectURL

0 Kudos
Reply
SShaffer2
Forms Fledgling

Re: Redirect Submit or Cancel Button to Previous Site (New Responsive Form)

Thanks for your response.

You explained how to add a Redirect URL to a button.  I already do that, but I'd like to redirect the user to whatever URL they came from.  For example, if the user was on an internal team site and clicked a link to my form, I'd like to send them back to that internal page after they click save.  I have found posts on how to do this with java, but I don't see how to add java code to buttons on New Responsive forms.  Does that make sense? 

Tags (1)
0 Kudos
Reply
satishkumar529
Design Dabbler

Re: Redirect Submit or Cancel Button to Previous Site (New Responsive Form)

As i said above you can use source parameter, while adding a link to the internal team site, add source parameter to the url
ex: http://xyz.com/lists/test/newform.aspx?source=InternalTeamSiteURL

Keep 'Redirect to URL' button property empty while using source parameter.
0 Kudos
Reply
SShaffer2
Forms Fledgling

Re: Redirect Submit or Cancel Button to Previous Site (New Responsive Form)

Sorry, but I am still missing something. How do I know where the user came from? If they are on an external site immediately before they open my form, I'd like them to be redirected back to that external site after they click Submit or Cancel. What would I type in the source parameter, to direct them back to whatever url they came from? For example, if they came to the site from a bookmark, I'd like to send them back to the site they were at immediately before launching the form. If I was able to use Java, I would do something like doRedirect(){history.go(-1);}. But, it appears Java is not available in the new Responsive form.
0 Kudos
Reply