Can we set default values for the choices coming from url?
Default values for the choices coming from url
Answers approved by surveyjs Support
Hello,
You can enable the Lazy Loading feature, define the defaultValue
property and load it using the onGetChoiceDisplayValue
event handler. For more information, please refer to the following demo: Lazy Loading.
Hello Vani,
The suggestion that Jane provided should work.
You can get the default value on survey.onLoadChoicesFromServer event and set it to your question "defaultValue" property.
Thank you,
Andrew
SurveyJS Team
So the defaultValue property works fine for APIs that don't require authorization. However, when we're using our internal APIs, we get the following error:
So how can we authorize our internal APIs? They work fine for displaying the dropdown list when a user is filling out the form, but only for setting a defaultValue are they throwing this error. Thank you!
Hello Vani,
The error comes from your server side, your server code. Our libraries only display this error.
Thank you,
Andrew
SurveyJS Team