Actions

URL fields/nl: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
Line 8: Line 8:
URL velden kunnen gebruikt worden in de :
URL velden kunnen gebruikt worden in de :
* eind-URL van de enquête (Lees: [[Survey texts|enquête teksten]]);
* eind-URL van de enquête (Lees: [[Survey texts|enquête teksten]]);
* URLveld voor de [[Survey quotas/nl|quota]]-instelling;
* URL-veld voor de [[Survey quotas/nl|quota]]-instelling;
* Start URL-veld van de enquête.
* Start URL-veld van de enquête.



Revision as of 17:13, 29 January 2018


Inleiding

URL velden kunnen gebruikt worden in de :

  • eind-URL van de enquête (Lees: enquête teksten);
  • URL-veld voor de quota-instelling;
  • Start URL-veld van de enquête.


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. Dit kan gedaan worden door deze optie te vullen in het scherm teksten en het inschakelen van het automatisch laden van de eind URL op het scherm Presentatie na het afronden van de enquête.

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.

Bijvoorbeeld:

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

Antwoordvelden

Je kunt ook {INSERTANS:SGQA} gebruiken. Dit URL-veld 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).

Bijvoorbeeld:

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


Expressies

Je kunt hier ook een expressie gebruiken.

Bijvoorbeeld:

http://www.limesurvey.org/test.php?gender={if(sex=='Male','M','F')}&name;={name}

Parameters

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.