Update, I found a solution that works, although it’s somewhat messy. Added this to the questions that need to be reset: Qualtrics.SurveyEngine.addOnload(function(){ var qid = this.questionId; var selectedchoice = 0; var selected = jQuery("#"+qid).find(".QuestionBody").find("[type=radio]"); var selectedid = selected.filter(":checked").attr("id"); var parts = selectedid.split("~"); selectedchoice = parts[2]; this.setChoiceValue(selectedchoice, false); selectedchoice = 0;});
Yes, thank you so much. I used that with OnReady and it works.
Very appreciated Tom. This worked.
Actually, I think I answered this: have to tell it to stop observing the event from the previous page: //Stop Observing from the previous block Event.stopObserving(document, 'keydown'); Took me a while. Josh
Hello! I just want to ask a follow up question. I use the attached code early in the survey, and then I have the exact same question again with the exact same code later in the survey, and this time, it just doesn't show the next button anymore. Do I need to reset anything to make it work a second time? Here is the code i use: Qualtrics.SurveyEngine.addOnReady(function() { choices = []; count = 0; payout = 0; payoutAmount = .00; perCount = 9999; baseFee = 1; totalPayout = 0; function hideEl(element) { element.hide(); } var nb = $('NextButton'); hideEl.defer(nb); var that = this; //Key Codes: A=65, B=66 Event.observe(document, 'keydown', function (e) { choices.unshift(e.keyCode); choices = choices.slice(0,2); if(choices[0] == 66 && choices[1] == 65 && count >= 1 ) { count++; $('count').innerHTML = count; payout += .01; Qualtrics.SurveyEngine.setEmbeddedData('Count',count); nb.show(); }
That tweak worked perfectly - thank you!
This is perfect. This is actually my first time ever using JS - so I think I misunderstood your JS line and tried to edit it - in fact, it works perfectly if i just copy and paste it. These solutions are great. Thank you so much for being patient - it's very, very appreciated!
On the second page you can see where I tried to do it before and successfully hide the radio button and the label for the multiple choice scale - either getting the numbers a bit more compact for the first option, or, getting the labels to show for the second option, would be great! Thank you so much.
https://wharton.ca1.qualtrics.com/jfe/preview/SV_4HOhEmi7ulmy6wt/BL_1GM8BMux5U5nMax Here's one! It's the first question - currently in plain jane look and feel.
Thanks Tom. It seems the padding is already at 1 or 0 - but there's some other thing preventing the radio buttons getting as close together as for the multiple choice question, for a given text size. I will keep looking for a solution. If there's a way to hide just the radio button and not the label of the multiple choice scale that might be a more promising way to go. Cheers, Josh
Well, thank you both, this has been very helpful! I have a small follow up question: Is there a way to move the labels closer together in the matrix setting ? Or, alternatively, a way to implement this in the multiple choice setting, without deleting the label as well as the radio button? The only drawback of how it looks at the moment is that the radio buttons are too far apart and are struggling to fit on the screen all at once (unfortunately I need 29 options!). Thanks again for the useful feedback so far - I am almost there! And it does work using the matrix setting! Josh
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.