html input saving data | XM Community
Skip to main content
Hi I want to use html code like



<input type="range" id="myText" min="0" max="100" value="40">



I also tried followings which doesn't work



Qualtrics.SurveyEngine.addOnReady(function() {

function formdata(){ var questionanswer= document.getElementById("myText").value;

Qualtrics.SurveyEngine.setEmbeddedData("Q1input", questionanswer); }

$('myText').observe('change', formdata()); });



is there any way I can save this result as data?



Please let me know



Thanks
If you use addOnPageSubmit, you don't need an event handler:

```

Qualtrics.SurveyEngine.addOnPageSubmit(function() {

var questionanswer= document.getElementById("myText").value;

Qualtrics.SurveyEngine.setEmbeddedData("Q1input", questionanswer);

});

```
It works thanks!

Leave a Reply