AnsweredAssumed Answered

Form Submit then redirect to previous URL wherever that is

Question asked by scannonkbr on Oct 31, 2018
Latest reply on Nov 5, 2018 by didosa

I have several pages that have a link to Add a New Item to a List with an Attachment. Let's say Pages A, B, and C. After the new item has been added and they press Submit, I want the user to go back to their previous page, wherever they started from. If they started on Page A, I want them to go back to Page A. If they started on B, return to B, and so on. I do not want to direct every user to Page X because that's not where they started. 

 

I have searched the 'net and could only find some javascript that reportedly got the previous page url, but then there was no additional help on where or how to use that information. And when I put that code into my page in a Script Editor Web Part, I press OK and my page crashes and will not reload. 

 

Many links that I have found are outdated and only contain other links that no longer exist. 

We are NOT allowed to use InfoPath.

We are NOT allowed to use SharePoint Designer. 

We are using SharePoint 2013. 

 

Can anyone please help?

 

Thank you

Susan

Outcomes