URL fields

From LimeSurvey Manual

Revision as of 18:42, 1 December 2016 by Tpartner (talk | contribs)
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎français • ‎日本語

End URL field

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


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).



You can also use any Expression Manager expression (since 1.92+).


Passthrough fields (LimeSurvey 2.x or later)

Starting with version 2.0 you now have to define any additional parameters that should be passed to the end URL in the survey settings (Tab "Panel integration"). To use such a parameter in the end URL just insert the tag {PASSTHRU:<paramname>} where <paramname> is the name of your input parameter.


You defined in the Panel integration tab a parameter named 'foobar'. The survey is started with a link like

where XYZ123 is the value you want to pass.

A survey end URL of{PASSTHRU:foobar} would then convert to

Passthrough fields (LimeSurvey 1.92 and older)

You can also use a 'passthrough' field name and data value in the end URL.

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


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 "{PASSTHRULABEL}={PASSTHRUVALUE}" would then convert to ""

Places to use URL fields

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

Start URL

Prefilling a survey using GET parameters

You can prefill all answer except upload and equation question type. You can use qcode naming for the parameters and set the value for single question. For multiple question type, you must use SGQA identifier

Then answer are set to the prefilled value, for single choice option, you must use the code of the answer, for multi choice question, you must use Y if you want to check the answer.


  • : Fill the question with code Q1 with 'prefilled'
  • : Fill the sub question SQ001 of question number 1 in group 1 with 'prefilled'
  • : Check the answer 'A1' at the sub question SQ001 of question number 1 in group 1 .
  • : Check the sub question SQ001 at question number 1 in group 1.
 Hint: GET parameters use ? for the first and & for subsequent parameters. If you already have ? in your URL, you must use & to add more GET parameters.
 Hint: The extra GET parameters are only filled when the survey starts anew. Therefor, for testing, always add newtest=Y to start a fresh survey. For example:

Prefilling a survey using GET parameters using URL parameters tab

You can prefill to, sometimes more easily, answer using URL parameters

Prefilling and hidding the answer

You can use hidden avanced settings to hide the question to respondant. Prefilling is happen too.

Before 1.92 version

Before 1.92 version, you must use SGQA and not directly the question code.