URL fields/de

=Introduction=

URL fields parameters can be used in the:
 * End URL field of the survey (see survey text elements)
 * URL field of the quota rule (read more about survey quotas here)
 * Start URL field of the survey (see survey text elements).

End-URL Feld
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.

But, LimeSurvey offers the possibility to use URL fields in many other ways which in turn allows you to enhance the functionality of your survey.

Basic fields
You can use {SAVEDID}, {TOKEN}, {SID}, and {LANG} in the end 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:

Answer fields
You can also use {INSERTANS:SGQA} or ExpressionScript variables. 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 (i.e. an email address collected during the survey).

For example:

It is important to add "newtest/y" to the URL to force a new session whenever your survey participants wants to fill in your survey.

In the above scenario, the URL pertains to a survey with ID = 48315, group =2, question=22 and answercodes = 2007 and 2008.

Expressions
You can also use any expression here.

For example:

Passthrough fields
To use passthrough fields, you must define the variable names via panel integration. If you don't assign a target question, the variables will not be saved into responses (read more about the LimeSurvey panel integration feature). To use such a parameter in the end URL, just insert the tag {PASSTHRU: } where   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 this one:

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

The end URL of a survey with the following URL  would then be converted to

=Start URL=

Prefilling a survey using GET parameters
You can prefill all answers except the upload and equation question type. You can use qcode naming for parameters and set the value for single question types. For the multiple question type, you must use a SGQA identifier.

Then, answers 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 prefill the answer.

Here are some start URL examples:


 * : Fill in the question with code QTEXT with 'prefilled'
 * : Fill in the subquestion SQ001 of question with title MULTI with 'prefilled' (for a multiple text question for example).
 * : Select the "other" answer option of a single choice question and fill in the other value with the text "Other text".
 * : Fill in the subquestion SQ001 of question with ID: 1 from group with ID: 1 with 'prefilled'
 * : Preselect the answer option 'A1' of the subquestion SQ001 of question with ID: 1 from group that has ID: 1.
 * : Preselect the subquestion SQ001 of the question that has the ID 1, from the group that has ID: 1.

Prefilling a survey using GET parameters using URL parameters tab
You can prefill (sometimes easier) answers using URL parameters which can be configured in panel integration.

Prefilling and hiding the answer
You can use the hidden attribute of a question to hide it from your respondents. If so, the question still remains prefilled.