Question T17351
Visible to All Users

How to get current question in a survey

created 10 months ago

I have several pages in the survey, inside each page I have several questions.
At the same time, I have the property "questionsOnPageMode" set on "questionPerPage".
When I first load the survey, if the user has a response saved in the database, I load it so it starts in the last answered question.
Is there a way I can programmatically get the current question?
I tried "survey.currentPage.name" but it gets the actual page name and not the current question name.

Answers approved by surveyjs Support

created 10 months ago

Hello Leticia,
You can implement the survey.onValueChanged event and get the last changed question using the options.question property.

To activate a survey starting with a specific question, use the survey.focusQuestion function.

Please let me know if you have any further questions.