I'm saving this question's response as embedded data for the duration of the survey, using JavaScript. I'm purposefully not adding this to Survey Flow so that it is discarded. This embedded data is POSTed to a web service before the end of the survey.
To keep this response from ending up in the survey data, I'm clearing it using JavaScript. Is there another way?
(In this example, the response is the first text field of a form. The first line in the function sets the embedded data, and the second clears the text field before proceeding.)
~~~~
Qualtrics.SurveyEngine.addOnPageSubmit(function()
{
/*Place your JavaScript here to run when the page is submitted */
Qualtrics.SurveyEngine.setEmbeddedData('FirstNameEm', jQuery("#"+this.questionId+" input[type=text]").eq(0).val());
var res = jQuery("#"+this.questionId+" input[type=text]").eq(0).val("")
});
~~~~
Best answer by fleb
View original