Ranking fields

Use ranking_input when you want respondents to arrange items in order of importance or preference. Respondents drag items into their chosen order.

Configuration

Each field type also accepts shared field properties.

NameTypeRequiredDefaultDescription
optionsstring[]Yesn/aItems the respondent can rank.
randomizebooleanNofalseShuffles the unranked items when the field first loads.

Validation

If the field is required and the respondent has not ranked anything, they cannot continue to the next page or submit until they rank an item. A field hidden through visible_if or hide_if skips validation, even when it is required.

Submission value

The answer is a JSON string containing objects with each item’s label and its rank. The value can also be null.

{ "feature_priority": "[{\"label\":\"Faster exports\",\"rank\":1},{\"label\":\"Team roles\",\"rank\":2},{\"label\":\"Dark mode\",\"rank\":3},{\"label\":\"Mobile app\",\"rank\":4}]" }

Example

{ "type": "ranking_input", "name": "feature_priority", "label": "Rank these features from most to least important", "options": ["Faster exports", "Team roles", "Dark mode", "Mobile app"], "randomize": true, "required": true }