Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Always hiding and disabling radio buttons

Thanks again Zachary!

That code works great, but I have one last question.

I have another column in my grid related to the "other specifies" rows that I always want to hide and disable regardless of whether anything was typed in the "other specify" text box.

I'm using the below code to try and accomplish this, but it is not working.  Am I missing something or is there other code that I need?


<script>
      
      function SSI_DisableRadioButtonOrCheckbox (){
            SSI_ToggleRadioButtonOrCheckbox('[% QuestionName() %]_r8_3');
              $('#[% QuestionName() %]_r8_3_graphical');          
            
}
      
</script> 

related to an answer for: Hiding the radio button
asked Oct 22 by Bryan
Thanks Zachary!  This works perfectly.

2 Answers

0 votes
I'd add another document.ready script:

<script>
$(document).ready(function(){
    SSI_DisableRadioButtonOrCheckbox('[% QuestionName() %]_r8_3');
    $('#[% QuestionName() %]_r8_3_graphical').hide();
})
</script>
answered Oct 22 by Zachary Platinum Sawtooth Software, Inc. (156,375 points)
0 votes
Assuming you want to hide and disable graphical button of row 8 and column 3 and the question direction is row wise, please use below code:

<script>
$(function(){
$("#[% QuestionName() %]_r8_3_graphical").closest(".input_cell").off();
$("#[% QuestionName() %]_r8_3_graphical").closest(".input_row").off();
});
</script>
<style>
#[% QuestionName() %]_r8_3_graphical{
    display:none !important;
}
</style>
answered Oct 22 by Rahul Mittal Gold (11,135 points)
...