Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

html input saving data

emabed
emabed NYCommunity Member - Trial User Qubie ✭
edited November 2019 in Custom Code

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

Best Answer

  • TomG
    TomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭
    Accepted Answer

    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);
    });
    

Answers