I am using SurveyJS
, but I'm new to this document.
In survey.js you need to provide json of both option and question once before starting survey.
But my requirement is to do api call for each question when user clicks on next button
I am using SurveyJS
, but I'm new to this document.
In survey.js you need to provide json of both option and question once before starting survey.
But my requirement is to do api call for each question when user clicks on next button
If I understand your question right, you can iterate through the all questions using the following code:
var json = { /* survey JSON */ };
var survey = new Survey.Model(json);
survey.getAllQuestions().forEach(function(question) {
// work with question here
// question.<property name>
});