URL fields

From LimeSurvey Manual

Revision as of 16:10, 5 June 2018 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Other languages:
Deutsch • ‎English • ‎Nederlands • ‎français • ‎日本語


URL fields parameters can be used in the:

End URL field

At the end of a survey or when a quota causes a survey to terminate, there is the option to set an ending URL. This URL is presented to the participant who has finished the survey on the end page or you can optionally set the participant to be automatically redirected to the respective URL. This can be done by filling in the End URL option from the Survey text elements panel and by enabling the automatic load of the end URL from the Presentation panel once a survey is completed .

However, 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} 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;
  • LANG is the language code.

For example:{SAVEDID}&var2={TOKEN}&var3={SID}&lang={LANG}

Answer fields

You can also use {INSERTANS:SGQA}. This URL field allows you to add the response to a specific question in the survey into the end URL. This can be useful for sending a response to an external script (ie an email address collected during the survey).

For example:{INSERTANS:1234X56X7}

However its important to add "newtest/y" to the URL. See this

That URL pertains to a survey with ID = 48315, group =2, question=22 and answercodes = 2007 and 2008.



You can also use any Expression Manager expression here.

For example:{if(sex=='Male','M','F')}&name;={name}

Passthrough fields

To use passhtrough fields, you have to define any additional parameters that should be passed into the end URL in the survey settings (read more about the LimeSurvey panel integration feature). To use such a parameter in the end URL, just insert the tag {PASSTHRU:<paramname>} where <paramname> is the name of your input parameter.

Let's suppose that you defined a parameter named "foobar". The survey is started with a link like

The XYZ123 is the value you want "to pass".

The end URL of a survey with the following URL{PASSTHRU:foobar} would then be converted to

Important.png  Attention : Please note that the passthrough fields can be used only with LimeSurvey 2.x or later!

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 types. For multiple question type, you must use a SGQA identifier.

Then answer are set to the pre-filled 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.

Here are some start URL examples:

  • : 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 parameter and "&" for the subsequent ones. 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. Therefore, 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 (sometimes easier) answers using URL parameters which can be configured in the panel integration.

Prefilling and hiding the answer

You can use hidden advanced settings to hide the question from your respondents. If so, the question still remains prefilled.