Redirect at the end of a survey

Use

IOM.Texts.EndOfInterview

and

IOM.Texts.EndOfInterview

to setup text to be displayed to the respondent after the interview has completed or when it has stopped.  These can also be used to setup a redirect.

You can use a REFRESH meta tag as the text to force a redirect.  For example, the following would redirect to this blog when the interview completes.

IOM.Texts.EndOfInterview = "<meta http-equiv='REFRESH' content='0; URL=https://www.SmarterDatacolection.com' />"

Setup different texts for

IOM.Texts.InterviewStopped

to redirect respondents differently based on the interview.  For example, you might redirect respondents that failed quota to another survey or redirect respondents who answered a particular question to a particular page.

If you need to include an ampersand in your URL, then use the

&amp;

construct for getting the & past the HTML validator in the HTML player.  If you forget and use just &, you will see the HTML for the URL on your end page, rather than being redirected.ode

6 thoughts on “Redirect at the end of a survey”

  1. this post is 5 years old, so I’m taking a shot here.

    I’m setting up a main page to run surveys for my company, as I’m tired of setting up redirects for every new survey (and it would make some other stuff easier).

    Anyways, I found this and it seemed like a step in the right direction, but I would like to insert a url to another web survey with a password appended to it. It is the same password the individual would have used for authentication.

    So, I’m pulling something from the samplerec and inserting it into this text. Can I do that using {#Password}?

  2. Hi Justin , how do you intend to get the password into the survey? If by password you mean ID , then something like this should be ok ,

    IOM.Texts.EndOfInterview = “<meta http-equiv=””REFRESH”” content=””0; URL=surveyurl&ID=” + IOM.Info.InterviewerID + “””/>”

  3. It’s the field used for authentication; and I’m actually trying to set up a portal page similar to what you have described in another post.

    I’ve played around with it a bit more, but the problem I’m running in to is the meta tag seems to be ignored, as it just displays the full URL on the screen.

    I’m running data collection 6.0.1, and this is what my routing script looks like:

    Dim sLink
    sLink = “https://MyServer/mrIWeb/mrIWeb.dll?I.Project=TargetProject&i.test=1&Password=” + IOM.SampleRecord.Item[“Password”]
    IOM.Texts.EndOfInterview = “”

    when I run this the meta tag displays like I have it scripted out, but it isn’t being recognized as a meta tag by the browser. When I look at the page source the characters around the meta tags are coded out in the html instead of just having the characters there.

    I found something in the DDL that says meta tags are blocked. do you have a workaround?

  4. Hi Justin, I have emailed you to get your script. I think the comments post is missing some of you code. When we have the answer I will update the post to make sure all can see the result.

Leave a Comment