How to hide/show and check/uncheck radio button | XM Community
Skip to main content

I am trying to hide/show and check/uncheck radio buttons using custom code but it was not working as expected. Can someone help me to find out the solution.

Here is the logic-
   

var input = jQuery(("QR~QID161#1~1~1").replace(/~/g, "\\\\~"));
input.prop("disabled",true);
input.closest("td").find("*").hide();

Issue_screenshot_radiobutton.PNG

Please try the below code and it should work. If you have more than 1 radio button to hide, then you can loop through.
var that = this.questionId;
jQuery("[id='QR~"+that+"~1"+"~1']").prop("disabled" , "true");
jQuery("[for='QR~"+that+"~1"+"~1']").css("display" , "none");


Hi,
Thanks for the suggestion!!
But, I'm still having same issue and no change after placing piece of code on console and under question JavaScript section as well.
radiobutton_stillissue_exists.PNG


Leave a Reply