Suppose I have a checkbox style question - "What fruits do you like?" and the options are: * Apples * Bananas * Oranges * Unsure I want to try and implement two functionalities: 1. In case the user selects "Unsure", then I'd want the other checkboxes to be deselected 2. If afterwards the user deselects "Unsure", then the selections made previously should reappear I need to necessarily figure out a way to implement (1). (2) would be a nice-to-have, but not wholly needed. Follows is the code, wherein I tried to implement this: jQuery("#QID10-4-label").click(function(){ if(jQuery("#QID10-4-label").hasClass("q-checked")){ //This will be implemented if the user has selected option 4 jQuery("#QID10-1-label").prop("q-checked", false); jQuery("#QID10-2-label").prop("q-checked", false); jQuery("#QID10-3-label").prop("q-checked", false); } else { //This will be implemented if the user has deselected option 4 //Ideally I'd want
Hi. I am new to Qualtrics and could not find a solution (or wasn't able to fully implement/build on current solutions) to my problems. I am designing a survey, wherein every question is scored, and a final score is calculated on the basis of these individual scores using a mathematical formula (for now, consider a simple summation of all scores, which is then multiplied by 3). So I wanted help on two fronts: 1. Firstly, it seems I need to create an embedded data field to calculate the final score, but the formula I've typed isn't working. Need to figure out what's wrong in my current formula or if an easier one is possible ! 2. Secondly, I want to display this final score on the top of the page. When we change our response to a question (by selecting another option), this score should be immediately be updated without me going to a different page. I know it seems strange for a respondent to immediately know how his/her response changes the final score, but this is by deliberate de
Hi! I'm trying to insert a set of custom buttons that can allow me to navigate between blocks in my survey. I am aware that the ToC feature allow you to do this, but for a better look/feel and more flexibility needed to add the buttons. This question had something very similar, but when I tried to implement the following code: jQuery("#ButtonID").click(function() { jQuery("a[id='BlockID']").click(); }); it did not work. An assumption I made here was that BlockID is actually the Flow ID. The TOC elements in the console look something like so for me ! The way I *think* the above code works is that if I click on a particular button, it simulates a click on the element with the relevant Flow ID - thus redirecting me to that block. But also, the href of all these elements point towards the same link "#" which some googling tells me is supposed to redirect me to the top of the page. Going on a bit of a tangent (since I'm just curious as well), I can't help but notice th
I've built some custom functions to calculate and display values based on embedded field values. Right now the functions run whenever we click on a radio button in the survey. The code is as follows Qualtrics.SurveyEngine.addOnload(function(){ function compute_total(){ //some computations with embedded data field happen here } function drawChart(){ //some chart elements are updated here } jQuery("input[type=radio]").click(compute_total); jQuery("input[type=radio]").click(drawChart); } And this works just fine. However, I also want both these functions to run just once when the page loads. And I'm not sure how to do that. window.onload doesn't work in Qualtrics. I tried the following: Qualtrics.SurveyEngine.addOnload(function(){ function compute_total(){ //some computations with embedded data field happen here } function drawChart(){ //some chart elements are updated here }
I've inserted two sliders in a question, and I need their values (need to perform math operations on those values to arrive at a final score I need to display on the same page - related to a previous question I had asked). A screenshot of the question with the values I want to get highlighted: ! I thought this was a pretty straightforward task of accessing the element by id and getting the value via either 1. var sliderValue = document.getElementById("QID15~10~true-result").value(); //I can apply a parseInt on sliderValue later 2. jQuery("#QID15~10~true-result").val() But neither seems to work and I'm not sure why. To present the full problem, whenever the user changes the value of the slider, I'd want the changed score to be recorded and displayed on the same page (much akin to my previous question). For that end, I'd written this code: `jQuery("input[type = hidden]").change(function () { if(jQuery("#QID15~10~true-result").val().length == 0){ var sliderScore = 0; } else{
Already have an account? Login
Enter your username or 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.