Search code examples
javascriptcssradio-buttonqualtrics

I am using CSS to hide radio buttons, but I would like to display them on one page using Javascript


On Qualtrics, I have entered the following CSS to hide radio buttons in the entire survey:

input[type=radio]{
visibility: hidden;  
}

However I would like them displayed for one page. I can only use javascript to do this.

Is it possible?


Solution

  • No need to add the jQuery library. Qualtrics uses prototype.js and you can use that. Just add the following JavaScript to the first question on your page:

    Qualtrics.SurveyEngine.addOnload(function() {
        $$('input[type=radio]').each(function(obj) {
            obj.style.visibility = 'visible';
        });
    });
    

    The code finds all the radio radio buttons on the page and changes them to visible.