Actions

URL fields

From LimeSurvey Manual

Revision as of 02:45, 28 May 2009 by C schmitz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

General

At the end of a survey, or when a quota causes a survey to terminate, there is the option of setting a URL. This URL is presented to the participant who has finished the survey on the completed page, or you can optionally set the participant to be automatically redirected to the URL.

There are a number of fields available to be used to enhance the functionality of this URL.

Basic fields

You can use {SAVEDID}, {TOKEN}, {SID} and {LANG} (since 1.71+) in this URL.

  • SAVEDID is the id assigned to this particular submission,
  • TOKEN is the token used to participate in the survey,
  • SID is the survey ID, and
  • LANG is the language code

Example

http://www.limesurvey.org/test.php?var1={SAVEDID}&var2;={TOKEN}&var3;={SID}〈={LANG} (external link)

Answer fields

You can also use {INSERTANS:[SGQA]} in this URL (since 1.82+).

  • {INSERTANS: [SGQA]} allows adding the response to a specific question in the survey to the final url. This can be useful for sending a response to an external script (ie an email address collected during the survey).

Example

"http://www.limesurvey.org/test.php?email={INSERTANS:1234X56X7}"

Passthrough fields

You can also use a 'pasthrough' fieldname and data value in the end url (versions 1.82+).

In some instances you may want to pass a value to the survey at initialisation, and then have that value passed through to an external script at the end (for example a marketing firms subsid).

Example

In this case you'd start the survey with the query url "index.php?sid=12345&passthru;=subsid&subsid;=9999".

In your url you would use {PASSTHRULABEL} and {PASSTHRUVALUE} to reuse these values at the end of the survey.

A URL of "http://www.limesurvey.org/test.php?{PASSTHRULABEL}={PASSTHRUVALUE}" would then convert to "http://www.limesurvey.org/test.php?subsid=9999"

Places to use URL fields

URL fields can be used in overall survey URL (see Creating a new survey ), and in the URL setting for each individual quota (see Quotas ).