Question T1713
Visible to All Users

Get remaining no of question using surveyjs

created 6 years ago

Hello,

I have integrate surveyjs builder in my application and I want to show remaining no of question like If I have one survey and in which 5 questions are present but I have filled only 2 questions and left 3 questions then I need remaining question count from that survey.

Could you please let me know how we can achieve this.

Thanks,

Answers approved by surveyjs Support

created 6 years ago

Please try the following code:

JavaScript
var result = 0; // surveyLive is for the "Test Survey" tab, maybe you need to use editor.survey or even just survey. Depends on your use case. editor.surveyLive.survey.getAllQuestions().forEach(function(q) { if (!q.isEmpty()) result++; });