Inhaltsverzeichnis

Using an answer in later questions

One of the main advantages of an electronic questionnaire is that it can react dynamically to participants responses. This chapter provides a brief overview.

Filter questions

Filter question – that means in the simplest case that questions/items are displayed or blended depending on the participant's answer (“Do you use Facebook?”) in the later course of the questionnaire. In some cases the participant will also be excluded from further participation (Screenout).

Show selected items

A special case of filter questions is the transfer of selected items to another question.

Example: In a multiple selection, the online services that a participant uses are queried. Later on a scale is to be asked how often he uses the selected services.

Filter on the same page

Sometimes you do not want to wait until the participant clicks on “Continue”, but when selecting an answer, another question is to be immediately faded in/out.

View responses

The participant has selected an answer (Selections) or typed (Text Inputs, Suggesting Text Input) – and this answer will appear later in the questionnaire in the text, in a question or in items.

With Placeholders text nodes can be exchanged dynamically at any location. Once a placeholder has been defined, it is available throughout the following questionnaire.

Multiple survey waves

In the case of multi-wave surveys, participants should be able to display responses from an earlier survey wave. The implementation depends on how the multi-wave survey was technically designed.

The following example shows the transmission of answers from Interview A to the later Interview B. The prerequisite is that the participants have been invited to the two survey waves by using mailing – or that the participants receive personalized links with an access code (URL to the Questionnaire).

In the first questionnaire, the answers to the selection question AF01 and the open text input TX01_01 are to be stored for later use. The key for storing is the subscriber ID from variable SERIAL (Additional Variables in the Data Set, caseSerial()).

$key = caseSerial();
$data = array(
  value('AF01', 'free'),
  value('TX01_01')
);
dbSet($key, $data);

In the second questionnaire, these data are then retrieved again by using dbGet() and are written in placeholders using replace(), which can then be used in question/item texts:

$key = caseSerial();
$data = dbGet($key);
replace('%auswahl%', $data[0]);
replace('%texteingabe%', $data[1]);

Tip: To understand the PHP code, the chapter Introduction to Arrays is usefull.

Tip: If you would like to use the database for content in the survey project, simply make a prefix to the key. Replace the line with $key= in both codes …

$key = 'DT-'.caseSerial();