How to remove radio buttons but keep text entry within multiple choice question | XM Community
Skip to main content

I need to remove the radio buttons from next to a text-entry enabled multiple choice question while keeping the last radio button with the “don’t know / unsure option.”  Not sure if I need javascript or html...

 

@Steve_1987: you can use JavaScript to achieve this. 

add a unique ID or class to the last radio button “Don’t Know”. You can add an ID in last radio button using below code:

 

<label for="custom-radio">Don't know</label>
<input type="radio" id="custom-radio" name="your-question-name" value="don't know">

 

Now in “Look & Feel” section of survey, in “Custom JavaScript section”, you can add JavaScript code to hide radio buttons.

refer below code for your reference:

 

Qualtrics.SurveyEngine.addOnload(function() {
   // Hide all radio buttons except the last one (Don't know)
   jQuery('.q-radio:not(:last)').hide();
});


Thanks @Abhishek_U - where do I put the code:

<label for="custom-radio">Don't know</label>
<input type="radio" id="custom-radio" name="your-question-name" value="don't know">

 

In the CSS as well? In the Javascript on the question?


Put the code In HTML editor and next code in Custom JavaScript section.


That gives me this:

 


@Steve_1987 I guess youre using simple layout
I can’t find the radio button under any specific id so can’t hide it individually. I can only hide all of them with this custom CSS code

.question .radio-button {
display: none !important;
}

You can still choose I don’t know by clicking on the text
 


Leave a Reply