2

I'm using sharepoint 2013.I created a survey using the survey app. I added a web part script to the survey. I tried to redirect to a thank you page after clicking the finish button on my survey. It turns out the code redirects to the thank you page but does not commit the results of the survey. The survey has 2 pages it saves the first page but does not save any results from the second page. Is there a way I can commit the results before redirecting to the thank you page in javascript?

var inputcCtrls = document.getElementsByTagName("input");   
for(var m=0; m<inputcCtrls.length; m++) 
{
  if(inputcCtrls[m].type=='button'&&inputcCtrls[m].value=='Finish') 
  {
   var funcOnClick = inputcCtrls[m].onclick;
   inputcCtrls[m].onclick = function() { window.location = "http://spdcportal/academy/Pages/ThankYou.aspx" };
  }
}
  • 1
    Please write some more details: version of sharepoint; do you use out of the box survey (and which one exactly) or custom one? – Damjan Tomic Dec 4 '17 at 11:57
  • @DamjanTomic I'm using sharepoint 2013 and I used the survey app to create the survey. – geek2be Dec 4 '17 at 13:58
0

The easy way is to get the URL and look for "/NewForm.aspx?Source="

The source= value is the page you want to redirect users to.

e.g. http://Server.com/SiteName/lists/SurveyName/NewForm.aspx?Source=http://cnn.com

  • Using source does not work when you have branching in your survey. Mine has branching so it doesn't work – geek2be Dec 5 '17 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.