Shared Choice Question Schema Properties
Base properties shared by all choice-based question types (dropdown, checkbox, radiogroup, etc.).
Element type: selectbase
Key properties: 18
Usage Notes
Section titled “Usage Notes”- Use these properties on choice-based question types such as
dropdown,checkbox,radiogroup,tagbox,ranking,imagepicker, andbuttongroup. - Use Choice Item for object choices and Choices By URL for remote choice loading.
- Type-specific pages document extra choice behavior such as checkbox selection limits, tagbox search, or image picker media sizing.
- Use
choicesFromQuestionwhen a later question should carry forward all, selected, or unselected choices from an earlier choice question. - Use
choiceValuesFromQuestionandchoiceTextsFromQuestionwhen carrying forward rows from a dynamic matrix or entries from a dynamic panel.
Key Properties
Section titled “Key Properties”choices
Section titled “choices”- Type:
choiceitem[] - Default:
[]
Gets or sets choice items. This property accepts an array of objects with the following structure:
choicesByUrl
Section titled “choicesByUrl”- Type:
restfull - Default:
—
Configures access to a RESTful service that returns choice items. Refer to the ChoicesRestful class description for more information. You can also specify additional application-wide settings using the settings.web object.
choicesFromQuestion
Section titled “choicesFromQuestion”- Type:
question_carryforward - Default:
—
Copies choice items from a specified source question. Accepts a question name. The source can be another choice question, a dynamic matrix, or a dynamic panel.
choicesFromQuestionMode
Section titled “choicesFromQuestionMode”- Type:
string - Default:
"all" - Allowed values:
all,selected,unselected
Specifies which choice items to copy from another question. Applies only when the choicesFromQuestion property is specified.
choicesVisibleIf
Section titled “choicesVisibleIf”- Type:
condition - Default:
—
A Boolean expression that is evaluated against each choice item. If the expression evaluates to false, the choice item becomes hidden.
choicesEnableIf
Section titled “choicesEnableIf”- Type:
condition - Default:
—
A Boolean expression that is evaluated against each choice item. If the expression evaluates to false, the choice item becomes read-only.
choicesOrder
Section titled “choicesOrder”- Type:
string - Default:
"none" - Allowed values:
none,asc,desc,random
Specifies the sort order of choice items.
choiceTextsFromQuestion
Section titled “choiceTextsFromQuestion”- Type:
string - Default:
—
Specifies which matrix column or dynamic panel question supplies choice texts. Use this property to construct choice items based on cell values in Dynamic Matrix and question values in Dynamic Panel.
choiceValuesFromQuestion
Section titled “choiceValuesFromQuestion”- Type:
string - Default:
—
Specifies which matrix column or dynamic panel question supplies choice values. Use this property to construct choice items based on cell values in Dynamic Matrix and question values in Dynamic Panel.
hideIfChoicesEmpty
Section titled “hideIfChoicesEmpty”- Type:
boolean - Default:
—
Specifies whether to hide the question if no choice items are visible.
showOtherItem
Section titled “showOtherItem”- Type:
boolean - Default:
—
Specifies whether to display the “Other” choice item.
showNoneItem
Section titled “showNoneItem”- Type:
boolean - Default:
—
Specifies whether to display the “None” choice item.
showCommentArea
Section titled “showCommentArea”- Type:
switch - Default:
—
Specifies whether to display a comment area.
otherText
Section titled “otherText”- Type:
string - Default:
— - Localizable: Yes
Gets or sets a caption for the “Other” choice item.
otherPlaceholder
Section titled “otherPlaceholder”- Type:
string - Default:
— - Localizable: Yes
A placeholder for the comment area. Applies when the showOtherItem or showCommentArea property is true.
noneText
Section titled “noneText”- Type:
string - Default:
— - Localizable: Yes
Gets or sets a caption for the “None” choice item.
dontKnowText
Section titled “dontKnowText”- Type:
string - Default:
— - Localizable: Yes
Gets or sets a caption for the “Don’t know” choice item.
refuseText
Section titled “refuseText”- Type:
string - Default:
— - Localizable: Yes
Gets or sets a caption for the “Refuse to answer” choice item.
Carry Forward Example
Section titled “Carry Forward Example”Carry forward selected answers into a follow-up ranking question:
{ "type": "ranking", "name": "productPriority", "title": "Rank the products you selected", "choicesFromQuestion": "selectedProducts", "choicesFromQuestionMode": "selected", "selectToRankEnabled": true, "hideIfChoicesEmpty": true}Carry forward dynamic matrix rows into a dropdown:
{ "type": "dropdown", "name": "featuredSku", "title": "Featured item", "choicesFromQuestion": "lineItems", "choiceValuesFromQuestion": "sku", "choiceTextsFromQuestion": "label", "hideIfChoicesEmpty": true}Generation Notes
Section titled “Generation Notes”choicesFromQuestionMode: "selected"is usually right for follow-up questions about answers the respondent picked.choicesFromQuestionMode: "unselected"is useful for asking why options were not selected.hideIfChoicesEmptyprevents empty follow-up questions when no carried-forward choices exist.- Keep choice
valuestable. Use choicetextfor labels and translations. - For ranking follow-ups,
selectToRankEnabledlets respondents choose a subset before ordering them.