What is the best way to redirect after someone takes a survey

0

I’m using the Post survey action ‘Redirect to a URL’ but that only lets me specify one URL. One of the first questions is Which practice does your doctor belong to. I’d like to redirect to the practice’s website based on the value of the practice question. What’s the best way to redirect to a website at the end of the survey. The website will depend on the answer to a question in the survey.

thanks,

-john

freestyle35 answered
    0

    Thanks for the great suggestions. Adding a javascript action to the ‘Thank You’ page is the best option based on some testing. I can put a 5 second timer, then redirect. But, How can I get the value of a question using Javascript? This is not made clear anywhere in the documentation. sgapiGetValue is part of their PHP-like API but unless I’m missing something, that function is not available using Javascript. 

    thanks again!

    freestyle35 answered
      0

      You could also create multiple URL redirect actions:

      https://help.surveygizmo.com/help/redirect-to-a-website

      You could then use Logic conditions to determine which URL redirect fires based on the answer to the question:

      https://help.surveygizmo.com/help/setup-question-logic

      The logic method doesn’t require any scripting but you would have to set up one redirect for each different link.

      Hope this helps!

      Dominic Sharpe answered
        0
        IS 2.20K Rep.

        You can do it with a JavaScript action and the location.assign() function. You would also need the sgapiGetValue function.

        If you are worried about JavaScript being unavailable you could do something clunkier like creating one URL Redirect action for each practice and then use the php based Custom Scripting and the sgapiGetValue and sgapiRunAction functions to execute the Redirect you want based on the answer to your first question.

        There are more details you would need to deal with, but either of these might get you started.

        IS answered
          ×

          Login

          Question stats

          • Active
          • Views604 times
          • Answers3 answers
          • Followers1 follower