TextOnlyResponse
Defined in: parser/types.ts:902
The TextOnlyResponse interface is used to define the properties of a text only response. TextOnlyResponses render as a block of text that is displayed to the user. This can be used to display instructions or other information. It does not accept any input from the user.
{
"id": "textOnlyResponse",
"type": "textOnly",
"prompt": "This is a text only response, it accepts markdown so you can **bold** or _italicize_ text.",
"location": "belowStimulus",
"restartEnumeration": true
}
In this example, the text only response is displayed below the stimulus and the enumeration of the questions is restarted.
Extends​
Omit<BaseResponse,"secondaryText"|"required"|"requiredValue"|"requiredLabel"|"paramCapture"|"hidden"|"withDontKnow">
Properties​
| Property | Type | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|
excludeFromRandomization? | boolean | Exclude response from randomization. If present, will override the responseOrder randomization setting in the components. Defaults to false. | - | BaseResponse.excludeFromRandomization | parser/types.ts:390 |
hidden? | undefined | - | - | - | parser/types.ts:914 |
id | string | The id of the response. This is used to identify the response in the data file. | - | BaseResponse.id | parser/types.ts:362 |
infoText? | string | The description that is displayed when the participant hovers over the response. This does not accept markdown. | - | BaseResponse.infoText | parser/types.ts:368 |
location? | ConfigResponseBlockLocation | Controls the response location. These might be the same for all responses, or differ across responses. Defaults to belowStimulus | - | BaseResponse.location | parser/types.ts:372 |
paramCapture? | undefined | - | - | - | parser/types.ts:913 |
prompt | string | The markdown text that is displayed to the user. | BaseResponse.prompt | - | parser/types.ts:905 |
required? | undefined | - | - | - | parser/types.ts:910 |
requiredLabel? | undefined | - | - | - | parser/types.ts:912 |
requiredValue? | undefined | - | - | - | parser/types.ts:911 |
restartEnumeration? | boolean | Whether to restart the enumeration of the questions. Defaults to false. | - | - | parser/types.ts:907 |
secondaryText? | undefined | - | - | - | parser/types.ts:909 |
style? | Styles | You can set styles here, using React CSSProperties, for example: {"width": 100} or {"width": "50%"} | - | BaseResponse.style | parser/types.ts:388 |
stylesheetPath? | string | The path to the external stylesheet file. | - | BaseResponse.stylesheetPath | parser/types.ts:386 |
type | "textOnly" | - | - | - | parser/types.ts:903 |
withDivider? | boolean | Renders the response with a trailing divider. If present, will override the divider setting in the components or uiConfig. | - | BaseResponse.withDivider | parser/types.ts:382 |
withDontKnow? | undefined | - | - | - | parser/types.ts:915 |