I am creating a new question format and I dont know how to record the question response in qualtrics | XM Community
Skip to main content
Hi guys, I am creating a new question format in qualtrics but I don't know the function which can be used to record the question response in qualtrics!



Many thanks for your help and time.

Mengya
`setEmbeddedData` will likely work. It will save it as a variable which shows up as a column in your data. It's kind of a catch-all solution, and is used like this:



```javascript

Qualtrics.SurveyEngine.setEmbeddedData('myVarName','myValue');

```



If you need it to actually be saved as a question response (usually for reporting reasons), you'll need to add a hidden question to the page and transfer the value. Depending on the question type, `setChoiceValue` would work for that.
Thank you for your quick and detailed reply!I am still wondering if I want to create my own element choice that gets all choice value from the provided radio button. After user select answer from my new created element then how I can send that selected value back to the qualtric radio button or send back to the system to save that answer value.



Much appreciate for your help 🙂
To select a choice of a hidden question you can probably use jQuery’s .click() or there is an undocumented JS function that may work for you:



Qualtrics.SurveyEngine.registryrhiddenQuestionId].setChoiceValue(choiceId, true);



If it’s a text value you can simply store the value in the input before the page is submitted.
That is so cool! It works! Thank you!

Leave a Reply