This is an old revision of the document!
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.
'XY01_02
'). 'code
'value()
: answer code according to the Variables Overview (also returned if no answer format is specified), for text input questions this is the text entered. 'label
''text
''free
'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'); }
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>');