up Inquisit Language Reference

setOptionValue function

Sets the response option value at the specified index for a multiple choice question.

Member of

<checkboxes><dropdown><listbox><radiobuttons>

Syntax

optionitem.name.setOptionValue(value, index)

Return Type

none

Parameters

Name Type Description
value string The value for the response.
index integer The index of the response value to set.

Remarks

The setOptionValue function sets the value of a response for a multiple choice question.

Examples

The following sets the value of the first response of a radioButtons question to cake.

<trial.example>
/ onTrialBegin = { radioButtons.example.setOptionValue("cake", 0}; }
</trial>

Copyright Millisecond Software, LLC. All rights reserved.