Forum Discussion
Allison Rizak
May 26, 2017Brass Contributor
InfoPath form - redirect to new page on submit
I thought this should be simple, but I'm having trouble finding a solution. I have a survey form that was customized in InfoPath 2013. The home page of my SharePoint site has a form web part that dis...
TJ Snell
Sep 12, 2017Copper Contributor
I ran into the same thing when trying to leverage the source parameter in the infopath form url. I found this article https://sharepoint.stackexchange.com/questions/41291/redirect-a-user-after-submitting-an-infopath-form that recommends this script...
<script type="text/javascript"> function RedirectIfFormIsClosed(){ var elem = document.getElementById('DialogFinalMessage'); if (elem !== null && elem.children.length > 0) { window.location.href = GetSource2(); } } ExecuteOrDelayUntilScriptLoaded(RedirectIfFormIsClosed, "inplview.js") </script>
So basically then you can define the Thank You URL using source= and if you don't want to use source you simply replace the variable
GetSource2()
with your Thank You URL.
Note: I ended up using a second view and didn't try the above. Maybe I will try it out now :)