Hi all,
I'm running into an issue where it appears input entered into a survey in an earlier question is being overwritten, and my output is showing up as the same value even though different values were entered into the survey.
Here is example javascript added to two different survey questions:
Question 1 (under edit question Javascript):
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
var Fbd1 = "input[id='QR~"+this.questionId+"']";
jQuery("#" + this.questionId + " .InputText").hide();
jQuery("#appt-time").on(" change", function() {
jQuery(Fbd1).val(jQuery("#appt-time").val()) ;
});
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Question 2 (under edit question Javascript):
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
var Fbd2 = "input[id='QR~"+this.questionId+"']";
jQuery("#" + this.questionId + " .InputText").hide();
jQuery("#appt-time").on(" change", function() {
jQuery(Fbd2).val(jQuery("#appt-time").val()) ;
});
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
The first question is "What was your bedtime?"
The second question is "What was your wake time?"
I have noticed whatever is entered into the second question seems to be overwriting the output for the first question. For example, if I respond 8:00PM for the first question and 4:00AM for the second question, in the output both answers are showing up as 8:00PM.
I am not great with Javascript and I am thinking this has something to do with the custom javascript code that I have added. Any and all input would be greatly appreciated.
Thank you.
Output in Qualtrics Survey is the same after using a javascript mask
Best answer by sdeering
@MatthewM,
I ended up getting it sorted out. It had to do with the Javascript and not the HTML, but I just would like to thank you again for reaching out so quickly to try to help!
Cheers,
Sean
Sign up
Already have an account? Login
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login to the Community
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join.
No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Login with Qualtrics
Welcome! To join the Qualtrics Experience Community, log in with your existing Qualtrics credentials below.
Confirm your username, share a bit about yourself, Once your account has been approved by our admins then you're ready to explore and connect .
Free trial account? No problem. Log in with your trial credentials to join. No free trial account? No problem! Register here
Already a member? Hi and welcome back! We're glad you're here 🙂
You will see the Qualtrics login page briefly before being taken to the Experience Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
