QuestionDropdownModel
A class that describes the Dropdown question type.
Properties
Methods
Events
Specifies whether to display a button that clears the selected value.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- True
- Implemented in:
- QuestionDropdownModel
Specifies whether users can add their own choices if the desired option isn't available in the dropdown.
Default value: false
Custom choices will only be stored temporarily for the duration of the current browser session. If you want to save them in a database or another data storage, handle the
onCreateCustomChoiceItemevent.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionDropdownModel
Enables lazy loading. If you set this property to true, you should implement the Survey's onChoicesLazyLoad event handler.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionDropdownModel
Specifies the number of choice items to load at a time when choices are loaded on demand.
Default value: 25
This property does not accept values below 25 to prevent the server from being flooded with requests.
- Type:
- number readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- 25
- Implemented in:
- QuestionDropdownModel
Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10
- Type:
- number readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionDropdownModel
- See also:
- choicesMin * , choicesStep
Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10
- Type:
- number readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionDropdownModel
- See also:
- choicesMax * , choicesStep
Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].
"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10
The default value of the choicesStep property is 1.
- Type:
- number readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- 1
- Implemented in:
- QuestionDropdownModel
- See also:
- choicesMin * , choicesMax
A placeholder for the input field.
- Type:
- string writable
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Implemented in:
- QuestionDropdownModel
Specifies whether users can enter a value into the input field to filter the drop-down list.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- True
- Implemented in:
- QuestionDropdownModel
- See also:
- searchMode * , SurveyModel.onChoicesSearch
Specifies a comparison operation used to filter the drop-down list. Applies only if searchEnabled is true.
Possible values:
"contains"(default)"startsWith"
- Type:
- "contains" | "startsWith" readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- contains
- Accepted values:
- contains , startsWith
- Implemented in:
- QuestionDropdownModel
- See also:
- SurveyModel.onChoicesSearch
Returns the selected choice item. If no item is selected, returns null.
- Type:
- ChoiceItem readonly
- Implemented in:
- QuestionDropdownModel
Specifies whether to wrap long texts in choice options onto a new line.
Default value: true
Disable this property if you want the texts to be truncated with ellipsis.
- Type:
- boolean readonly
This property is stored in the survey JSON definition and can be edited in the Survey Creator.
- Default value:
- True
- Implemented in:
- QuestionDropdownModel
Send feedback to the SurveyJS team
Need help? Visit our support page