I have a text entry question with a large number of Form type items.
I would like to find a way to create an embedded data variable that is a count of how many of these Form items were filled out (i.e., not left empty).
Is there a way to do this?
Solved
How to count the number of non-empty responses in a Form type Text Entry question?
Best answer by rondev
Create an embedded data - "Count" before the form type question in survey flow. Paste the below code in the JS of the form type question:
Qualtrics.SurveyEngine.addOnPageSubmit(function(type)
{
if(type == "next")
{
var c = 0;
jQuery("#"+this.questionId+" .InputText").each(function(){
if(jQuery(this).val().trim()!="") c++;
});
Qualtrics.SurveyEngine.setEmbeddedData("Count", c);
}
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

