Actions

URL fields/nl: Difference between revisions

From LimeSurvey Manual

No edit summary
(Updating to match new version of source page)
Line 1: Line 1:
<languages />
<languages />
__TOC__
__TOC__
=Introduction=
URL fields parameters can be used in the:
* End URL field of the survey (see the [[Survey texts|survey texts wiki section]]);
* URL field of the quota rule (read more about [[Survey quotas|survey quotas here]])
* Start URL field of the survey.


=Eind-URL veld=
=Eind-URL veld=


Na het invullen van de enquête, of wanneer er door een quota een enquête wordt afgebroken, is er een mogelijkheid om een URL aan te geven. Deze URL wordt aan de respondent getoond op de afsluitpagina. Je kunt ook instellen dat de respondent automatisch naar deze URL doorgestuurd wordt.
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 texts]] 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.


Er zijn een aantal velden beschikbaar die gebruikt kunnen worden in deze URL.


==Basisvelden==
==Basisvelden==


Je kunt de velden {SAVEDID}, {TOKEN}, {SID} en {LANG} in de URL gebruiken.
You can use '''{SAVEDID}''', '''{TOKEN}''', '''{SID}''' and '''{LANG}''' in this URL:
* SAVEDID is het id dat toegekend is aan deze ingevulde enquête
*'''SAVEDID''' is the id assigned to this particular submission;
* TOKEN is het token van de respondent voor deze enquête
*'''TOKEN''' is the token used to participate in the survey;
* SID is het ID van de enquête
*'''SID''' is the survey ID;
* LANG is de taalcode (vanaf versie 1.71+)
*'''LANG''' is the language code.


'''Voorbeeld'''
For example:


<code>
<code>
Line 24: Line 35:
==Antwoordvelden==
==Antwoordvelden==


Je kunt ook {INSERTANS:SGQA} in deze URL gebruiken (sinds versie 1.82+).
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).
* {INSERTANS: SGQA} staat toe dat het antwoord op een bepaalde vraag wordt toegevoegd in de URL. Dit kan handig zijn als je een respons wilt doorsturen naar een extern script (bijvoorbeeld een e-mailadres dat ingevuld is in de enquête).


'''Voorbeeld'''
For example:


<code><nowiki>
<code><nowiki>
http://www.limesurvey.org/test.php?email={INSERTANS:1234X56X7}
http://www.limesurvey.org/test.php?email={INSERTANS:1234X56X7}
</nowiki></code>
</nowiki></code>


==Expressies==
==Expressies==


Je kunt ook een expressie gebruiken (sinds versie 1.92+).
You can also use any [[Expression Manager|Expression Manager]] expression here.


'''Voorbeeld'''
For example:


<code><nowiki>
<code><nowiki>
Line 43: Line 54:
</nowiki></code>
</nowiki></code>


==Parameters (vanaf LimeSurvey 2.x)==
==Passthrough fields==
 
Vanaf versie 2.0 kun je ook zelf velden definiëren die je als parameters in de URL wilt meegeven. Kijk bij de enquête algemene instellingen (Tab "Paneel-integratie"). Om een  parameter in de URL te gebruiken voeg je de tag {PASSTHRU:<naam van je invoerparameter>} toe.


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


Je hebt in de tab Paneel-integratie een parameter 'foobar' toegevoegd. De enquête wordt gestart met een link als
Let's suppose that you defined [[Panel integration|a parameter]] named "foobar". The survey is started with a link like


<code>
<code>
Line 55: Line 64:
</code>
</code>


de waarde die je wilt doorgeven is dus XYZ123.
The XYZ123 is the value you want "to pass".


Een eind-URL van een enquête <code><nowiki>http://www.limesurvey.org/test.php?foobarout={PASSTHRU:foobar}</nowiki></code> wordt dan omgezet naar <code><nowiki>http://www.limesurvey.org/test.php?foobarout=XYZ123</nowiki></code>
The end URL of a survey with the following URL <code><nowiki>http://www.limesurvey.org/test.php?foobarout={PASSTHRU:foobar}</nowiki></code> would then be converted to <code><nowiki>http://www.limesurvey.org/test.php?foobarout=XYZ123</nowiki></code>


==Parameters t/m versie 1.92==


Je kun ook een veldnaam en een waarde meegeven in de eind URL van een enquête.
{{Alert|title=Attention|text=Please note that the passthrough fields can be used only with LimeSurvey 2.x or later!}}


Soms wil je een waarde doorgeven bij het initialiseren van een enquête en die waarde doorgeven met een extern script (bijvoorbeeld een id van een subsidie van een reclamebureau).
=Start-URL=
 
'''Voorbeeld'''


In dit geval moet de enquête gestart worden query url "index.php?sid=12345&passthru;=subsid&subsid;=9999".
In je URL zou je gebruiken {PASSTHRULABEL} en {PASSTHRUVALUE} om deze waarden te hergebruiken aan het eind van de enquête.
Een URL als "http://www.limesurvey.org/test.php?{PASSTHRULABEL}={PASSTHRUVALUE}" wordt dan omgezet naar "http://www.limesurvey.org/test.php?subsid=9999"
==Plaatsen om URL velden te gebruiken==
URL velden kunnen gebruikt worden in de algemene eind-URL ([[Creating a new survey/nl|Maken van een nieuwe enquête]]), en in de  URL instelling per  [[Quotas/nl|quota]].
=Start-URL=


==Voorinvullen enquête m.b.v.  GET parameters==
==Voorinvullen enquête m.b.v.  GET parameters==


Je kunt alle antwoorden voorinvullen behalve die van de vraagtypes upload en vergelijking. Je kunt de  [[Expression Manager/nl#Toegang tot variabelen|qcode naming]] gebruiken voor de parameters en de waarde zetten voor de meeste vragen. Voor meervoudige vraagtypes moet je de [[SGQA identifier/nl|SGQA identifier]] gebruiken
You can prefill all answer except upload and equation question type. You can use [[Expression Manager#Access to Variables|qcode naming]] for the parameters and set the value for single question types. For multiple question type, you must use a [[SGQA identifier]].


De antwoorden worden dan gevuld met de vooringevulde waarde, je moet de antwoordcode gebruiken, bij  meervoudige vragen moet je de Y gebruiken als je het antwoord wilt controleren.
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.


'''Voorbeeld'''
Here are some start URL '''examples''':


* <code><nowiki>http://ls.example.org/1234?QTEXT=prefilled</nowiki></code> : Vul de vraag met code Q1 met <nowiki>'prefilled'</nowiki>
* <code><nowiki>http://ls.example.org/1234?QTEXT=prefilled</nowiki></code> : Vul de vraag met code Q1 met <nowiki>'prefilled'</nowiki>
Line 92: Line 87:
* <code><nowiki>http://ls.example.org/1234?1234X1X1SQ001=Y</nowiki></code> : Controleer de  subvraag SQ001 van vraagnummer 1 in groep 1.
* <code><nowiki>http://ls.example.org/1234?1234X1X1SQ001=Y</nowiki></code> : Controleer de  subvraag SQ001 van vraagnummer 1 in groep 1.


{{Hint|Text=De GET-parameters gebruiken ? bij de eerste parameter en bij een volgende parameter &. Als er in de URL al een ? staat moet je een & gebruiken bij parameters die je toevoegt.}}
{{Hint|Text=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|Text=De extra GET-parameters worden alleen gebruikt bij het starten van de enquête. Als je een eigen test maakt, kun je beter  newtest=Y toevoegen. Voorbeeld: <code><nowiki>http://ls.example.org/1234?QTEXT=prefilled&newtest=Y</nowiki></code>}}
{{Hint|Text=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: <code><nowiki>http://ls.example.org/1234?QTEXT=prefilled&newtest=Y</nowiki></code>}}
 


==Voorinvullen enquête m.b.v. GET parameters door gebruik van URL parameters tab==
==Voorinvullen enquête m.b.v. GET parameters door gebruik van URL parameters tab==


Je kunt alvast van te voren antwoorden invullen met  [[Survey_settings/nl#Paneel-integratie (URL parameters)|URL parameters]].
You can prefill (sometimes easier) answers using URL parameters which can be configured in the [[Panel integration|panel integration]].
 
==Voorinvullen en het antwoord verbergen==


Je kun verborgen geavanceerde instellingen gebruiken om de vraag voor de invuller te verbergen. Het voorinvullen is ook dan mogelijk.


==Voor versie 1.92==
==Prefilling and hiding the answer==


In versies voor 1.92 moet je de SGQA gebruiken en niet de vraagcode.
You can use hidden advanced settings to hide the question from your respondents. If so, the question still remains prefilled.

Revision as of 18:25, 25 January 2018


Introduction

URL fields parameters can be used in the:


Eind-URL veld

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


Basisvelden

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:

http://www.limesurvey.org/test.php?var1={SAVEDID}&var2={TOKEN}&var3={SID}&lang={LANG}

Antwoordvelden

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:

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


Expressies

You can also use any Expression Manager expression here.

For example:

http://www.limesurvey.org/test.php?gender={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

http://example.org/limesurvey/index.php/survey/index/sid/12345/lang/eb?foobar=XYZ123

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

The end URL of a survey with the following URL http://www.limesurvey.org/test.php?foobarout={PASSTHRU:foobar} would then be converted to http://www.limesurvey.org/test.php?foobarout=XYZ123


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


Start-URL

Voorinvullen enquête m.b.v. 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:

  • http://ls.example.org/1234?QTEXT=prefilled : Vul de vraag met code Q1 met 'prefilled'
  • http://ls.example.org/1234?1234X1X1SQ001=prefilled : Vul de subvraag SQ001 van vraagnummer 1 in groep 1 met 'prefilled'
  • http://ls.example.org/1234?1234X1X1SQ001=A1 : Controleer het antworod 'A1' op de subvraag SQ001 van vraagnummer 1 in groep 1 .
  • http://ls.example.org/1234?1234X1X1SQ001=Y : Controleer de subvraag SQ001 van vraagnummer 1 in groep 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: http://ls.example.org/1234?QTEXT=prefilled&newtest=Y


Voorinvullen enquête m.b.v. GET parameters door gebruik van 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.