Interface: NumericalResponse

The NumericalResponse interface is used to define the properties of a numerical response. NumericalResponses render as a text input that only accepts numbers, and can optionally have a min and max value, or a placeholder.

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.

Inherited from

BaseResponse.correctAnswer

Defined in

parser/types.ts:151


hidden

Optional hidden: boolean

Controls whether the response is hidden.

Inherited from

BaseResponse.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.

Inherited from

BaseResponse.id

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.

Inherited from

BaseResponse.location

Defined in

parser/types.ts:149


max

Optional max: number

The maximum value that is accepted in the input.

Defined in

parser/types.ts:173


min

Optional min: number

The minimum value that is accepted in the input.

Defined in

parser/types.ts:171


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.

Inherited from

BaseResponse.paramCapture

Defined in

parser/types.ts:157


placeholder

Optional placeholder: string

The placeholder text that is displayed in the input.

Defined in

parser/types.ts:169


prompt

prompt: string

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

Inherited from

BaseResponse.prompt

Defined in

parser/types.ts:145


required

required: boolean

Controls whether the response is required to be answered.

Inherited from

BaseResponse.required

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.

Inherited from

BaseResponse.requiredLabel

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.

Inherited from

BaseResponse.requiredValue

Defined in

parser/types.ts:153


type

type: "numerical"

Defined in

parser/types.ts:167