Ranking Question Schema Properties
A question that allows respondents to rank items by dragging them into order.
Element type: ranking
Key properties: 15
Generation Hints
Section titled “Generation Hints”- Aliases: rank order, drag ranking, preference ordering.
- Use when: respondents must order choices by preference or priority.
- Recommended properties:
type,name,title,choices,selectToRankEnabled.
{ "type": "ranking", "name": "priorities", "title": "Rank these priorities", "choices": ["Cost", "Speed", "Quality"] }Key Properties
Section titled “Key Properties”choices
Section titled “choices”- Type:
checkboxitem[] - 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 question. Accepts a question name.
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.
selectToRankEnabled
Section titled “selectToRankEnabled”- Type:
switch - Default:
false
Specifies whether users can select choices they want to rank.
selectToRankAreasLayout
Section titled “selectToRankAreasLayout”- Type:
string - Default:
"horizontal" - Allowed values:
horizontal,vertical
Specifies the layout of the ranked and unranked areas. Applies when selectToRankEnabled is true.
selectToRankEmptyRankedAreaText
Section titled “selectToRankEmptyRankedAreaText”- Type:
text - Default:
— - Localizable: Yes
A placeholder displayed in the area for ranked choices. Applies when selectToRankEnabled is true.
selectToRankEmptyUnrankedAreaText
Section titled “selectToRankEmptyUnrankedAreaText”- Type:
text - Default:
— - Localizable: Yes
A placeholder displayed in the area for unranked choices. Applies when selectToRankEnabled is true.
minSelectedChoices
Section titled “minSelectedChoices”- Type:
number - Default:
0
Specifies the minimum number of selected choices.
maxSelectedChoices
Section titled “maxSelectedChoices”- Type:
number - Default:
0
Specifies the maximum number of selected choices.
valuePropertyName
Section titled “valuePropertyName”- Type:
string - Default:
—
Specifies a property name used to store selected values.
hideIfChoicesEmpty
Section titled “hideIfChoicesEmpty”- Type:
boolean - Default:
—
Specifies whether to hide the question if no choice items are visible.
Shared Properties
Section titled “Shared Properties”This page lists only properties that are specific to this element type or especially important for generation.
- Use Shared Question Properties for common fields such as
name,title,description,isRequired,requiredIf,visibleIf,enableIf,readOnly,defaultValue,validators,width, and layout options. - Use Shared Choice Question Properties for shared choice fields such as
choices,choicesByUrl,choicesFromQuestion,showOtherItem,showNoneItem, and special choice labels. - Use Choice Item for object choices and Choices By URL for remote choice loading.