This seems a basic request but I can't figure it out. I have some questions (matrix table if it matters) with default choices, pulled from my contact list. This works. I want my respondents to be able to change these answers. But I want the answers to be pulled through to later questions. I have done this using default choices (piping from survey questions), and this works initially, but if I go back and change the answers to the first question, the new values are not pulled through to the later questions. A support person tells me that this is intended functionality. Does anyone have any pointers to how I might get around this. JS? TIA. Stephen
I must be missing something blindingly obvious but my JS skills are slight. I have question 1 with a single text entry box. Question 2 is side-by-side with two columns of open text boxes. Once the respondent has done Q1 and entered something in the top left box of Q2 I want the ratio of the two to appear in the top box of column 2 in Q2. For some reason the Q1 value is not being transferred. Qualtrics.SurveyEngine.addOnReady(function() { /*Place your JavaScript here to run when the page is fully displayed*/ inputW = jQuery('[name="QR~QID54#1~1~1~TEXT"]'); //question 2 first box inputEmp =jQuery('[name="QR~QID14~1"]'); //question 1 inputWpc=jQuery('[name="QR~QID54#2~1~1~TEXT"]'); //box to show ratio inputW.change(function () { var val1 = (isNaN(parseInt(inputW.val()))) ? 0 : parseInt(inputW.val()); console.log(val1); var val2 = (isNaN(parseInt(inpu
I'm new to Qualtrics and fairly new to Javascript so hope I can make this intelligible. So this simple bit code changes the value of one box depending on the value of another. (I'm sure it can be done more elegantly.) My question is: how can I repeat this code for many questions without having to write a separate function for each? Thanks. `Qualtrics.SurveyEngine.addOnReady(function() { /*Place your JavaScript here to run when the page is fully displayed*/ var el1="QR~" + this.questionId + "~1~1~TEXT"; //box 1,1 var el1a=jQuery("[id='" + el1 + "']"); var el2="QR~" + this.questionId + "~1~2~TEXT"; //box 1,2 var el2a=jQuery("[id='" + el2 + "']"); el1a.change(function() { if (el1a.val().length>0){ if (isNaN(el1a.val())) {jQuery("[id='" + el2 + "']").val("Not a number");} else {jQuery("[id='" + el2 + "']").val("A number");}} }) });`
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.