Question
Embedded data with custom javascript
Hi all,
I'm currently trying to record text data with custom javascript. I have hole text that I ask my participant to fill. Once, the participant has finish I want that when he/she clicks on a submit button the text data are recorded.
From what I saw in the Qualtric documentation, there is the possibility to use the addEmbeddedData ( ) function. So what I did is the following:
1) I created an Embedded Data in the Survey Flow with the column 'data', 'rep1', 'rep2', 'rep3', 'rep4', 'rep5', 'rep6', 'rep7', 'rep8', 'rep9', 'rep10' all of String type.
2) To test that my data are actually recorded, I added the below code. When the page load, there is an automatic insertion of some text values in the corresponding columns:
Qualtrics.SurveyEngine.addOnReady(function(){
Qualtrics.SurveyEngine.addEmbeddedData ( 'data' , 'test' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep1' , 'tellement' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep2' , 'fantastique' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep3' , 'genial' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep4' , 'style' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep5' , 'relaxe' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep6' , 'test' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep7' , 'trompette' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep8' , 'force' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep9' , 'fraise' )
Qualtrics.SurveyEngine.addEmbeddedData ( 'rep10' , 'universite' )
});
However, it seems that the data are not recorded. Do you have an idea of what I'm doing wrong?
Thanks for your answer!
D.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.