storing the text written by a survey taker in a text entry box in embedded data with Javascript | XM Community
Solved

storing the text written by a survey taker in a text entry box in embedded data with Javascript

  • 13 March 2019
  • 2 replies
  • 152 views

Badge +6
I am working on the survey that you can preview here:

https://wharton.ca1.qualtrics.com/jfe/preview/SV_ekAwRhlPI3HGfNH?Q_SurveyVersionID=current&Q_CHL=preview

I am trying to save the text entry responses to embedded data. I have named the fields earlier (est1 and est2) in the survey flow so Javascript recognizes and fills them, and am using this function:

Qualtrics.SurveyEngine.setEmbeddedData('est1', "?")

But basically, I don't know what to put as the question mark, or how to create a variable that I can refer to instead of that question mark. I have been searching for many hours online but i expect my question is too basic for anyone even to have had to ask it before... any help would be very appreciated.

Josh
icon

Best answer by Anonymous 13 March 2019, 03:42

View original

2 replies

Hello @lejoshua ,

If you are trying to get the input text value in embedded data then use the below code:

jQuery("#"+this.questionId+" .InputText").on('blur',function(){
Qualtrics.SurveyEngine.setEmbeddedData('est1', jQuery(this).val());
});
Badge +6
Yes, thank you so much. I used that with OnReady and it works.

Leave a Reply