I am sorry but I do not know how to use code so I do not understand what you mean to replace the loops with the code. The JS code I am using is one that I found in the Qualtrics Library but the year coverage goes from 1900-2049 so I was trying to revise it so that it only covers 2021-2024. What I am trying to accomplish is to add a question so that the interviewer can enter the date the interview was done. Do you have another suggestion to do this? I am new to using Qualtrics and everything I have learned in programming 3 surveys is from researching online. I was able to use the code I have shared with you to record the participants' DOB and I was able to manually delete years 1900-1920 and it worked fine but when I tried it for this when I viewed it in Review the year is complete missing from the drop down.
Yes, here it ishttps://uic.ca1.qualtrics.com/jfe/preview/SV_1TgrutuIw6qRnPo?Q_CHL=preview&Q_SurveyVersionID=current
In the Preview when I click Year nothing appears. Here is the JS. I can't screenshot it because it is longer than page view. I copied and pasted it below with the changes to reflect the years I want to use. Please note in my previous attempts I actually changed all the places where 1900 and 2049 appeared and it still did not work. I have no idea what I am doing wrong. Also, thank you for all your help with this. I really appreciate it. Qualtrics.SurveyEngine.addOnload(function(){ //Set years you would like to have available var yearFirst = 2021; //Min 1900 var yearLast = 2024; //Max 2049 //This all remains unchanged var mo=document.getElementsByName('QR~'+qid+'#1~1')[0]; var day=document.getElementsByName('QR~'+qid+'#2~1')[0]; var yr=document.getElementsByName('QR~'+qid+'#3~1')[0]; var j = yearLast-1898; for(i=j;i
I changed the years like you did and it still does not work. I have saved the changed in the JS too. Here is the screenshot after I changed the year like you did and saved it, I am still getting the extra years and when I try to view it in Preview when I click on Year the drop menu shows no years. Why doesn't it for me me?
Thank you, Ifer0105. I continued to try different things and ended up doing exactly what you suggested by first changing the format to a matrix so I could use value count to drive the conditions. I set up logic skips for each response option to skip to Q6 or to next block. I believe this worked. Thank you again for responding.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.