how to add the id field to each question?
how to add the id field to each question?
Answers
You may do it onComplete event.
survey.onComplete.add(function(survey, options) {
var questions = survey.questions;
for(var i = 0; i < questions.length; i ++) {
var q = questions[i];
if(q.isEmpty && !q.isEmpty()) {
survey.setValue(q.name + "_id", q.id);
}
}
});
Thank you,
Andrew
How to add the field id to each question in the results?