The dropSources attribute specifies the set of responses that the monkey should choose from when performing a given trial.
<trial> <likert> <openended> <sliderTrial> <surveyPage>
Name | Type | Description |
---|---|---|
stimulus | visualstimulus | The name of a visual stimulus being presented on this trial. |
expression | value | An expression that resolves to a visual stimulus being presented on this trial. |
This attribute specifies a set of responses considered valid for the test monkey when performing this trial. The set can consist of any valid expression, including numbers, strings, and properties. When the test monkey is run and Inquisit enCounters this attribute on a given trial, it will randomly select from the responses listed in the attribute. Controlling the monkey's response is useful for testing scripts that behave very differently depending on responding, or that allow the participant to abort the experiment with a particular response. For example, if a script includes an informed consent trial, the dropSources attribute can be used to make sure that the monkey always gives consent.
The following trial makes sure the monkey always consents to participate:
<trial consent>
/ stimulusTimes=[0=consentform, agreeButton, disagreeButton]
/ inputDevice=mouse
/ validResponse=(agreeButton, disagreeButton)
/ dropSources=("agreeButton")
/ onTrialEnd=[if (trial.consent.response == "disagreeButton") script.abort()]
</trial>
The following trial makes sure the monkey always consents to participate:
<trial example>
/ stimulusTimes=[0=target]
/ inputDevice=keyboard
/ validResponse=("e", "i")
/ dropSources=(values.dropSources)
</trial>