Reply To: Hiding and showing radio button

Home Forums Support Hiding and showing radio button Reply To: Hiding and showing radio button

#589
Erwin Haasnoot
Keymaster

Hi Michael,

Seems like two things are wrong with the code. The way I entered it into the blog post (which converts > to <, etc.) and the actual code itself. If there aren’t 10 answer options, the code will fail (after hiding every radio button). This should work:

Qualtrics.SurveyEngine.addOnload(function() {
var QID = this.questionId,
radios = $$(‘#’+ this.questionId + ‘ *[type=”radio”]’);

for (var i = 0; i < radios.length; i++) { radios[i].style.display = "none"; } (function(delay_container) { for (var i = 0; i < radios.length; i++) { radios[i].style.display = "block"; }; }).delay(2 /*seconds*/ , this.questionContainer); }); I apparently need to fix the code tags in the forum, as they don't work properly.