Inhaltsverzeichnis

value()

mixed value(string variable, [string outputformat])

The participant's responses (answer codes, selected options or text inputs) can be determined with this function.

Note: Only responses given by the participant on an earlier page in the questionnaire, and already transmitted to the server with „Next“ can be called up.

Application in Filters

Tip: Please also see Filters and Conditional Questions.

The respondent answered question 07 in section AB (a dichotomous scale) on the previous page. The following code only calls up question XY01 if the participant answered „yes“ (in this example with the value 2) to the item 03 in question AB07:

if (value('AB07_03') == 2) {
  question('XY01');
}

Display Individual Response

The participant can select their favorite school subject or write it in themselves in „other:“. The subject should be displayed on a later page.

Tip: Please also see Placeholders.

$subject = value('AB08', 'free');
html('<h1>School subject: '.$subject.'</h1>');