Interface: BaseResponse

The BaseResponse interface is used to define the required fields for all responses. Other Response interfaces inherit properties from the BaseResponse interface. Therefore, all responses must include these properties.

Hierarchy

Table of contents

Properties

Properties

correctAnswer

Optional correctAnswer: unknown

The correct answer to the response. This is used in the data download and can be shown in the admin panel.

Defined in

parser/types.ts:151


hidden

Optional hidden: boolean

Controls whether the response is hidden.

Defined in

parser/types.ts:159


id

id: string

The id of the response. This is used to identify the response in the data file.

Defined in

parser/types.ts:143


location

location: "sidebar" | "aboveStimulus" | "belowStimulus"

Controls the response location. These might be the same for all responses, or differ across responses.

Defined in

parser/types.ts:149


paramCapture

Optional paramCapture: string

Use to capture querystring parameters in answers such as participant_name. See the examples for how this is used, but prefer uiConfig.urlParticipantIdParam if you are capturing a participant ID.

Defined in

parser/types.ts:157


prompt

prompt: string

The prompt that is displayed to the participant. You can use markdown here to render images, links, etc.

Defined in

parser/types.ts:145


required

required: boolean

Controls whether the response is required to be answered.

Defined in

parser/types.ts:147


requiredLabel

Optional requiredLabel: string

You can provide a required label, which makes it so a participant has to answer with a response that matches label.

Defined in

parser/types.ts:155


requiredValue

Optional requiredValue: unknown

You can provide a required value, which makes it so a participant has to answer with that value.

Defined in

parser/types.ts:153