Have an idea?

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

Hiding the radio button

Thanks Zachary!

This worked, but the client has now requested the radio button be hidden as well as disabled until the respondent starts typing something in the other specify textbox.  Is this doable?
asked Oct 22 by Bryan

1 Answer

0 votes
Try this:

<script>
function disableOrEnableRadioButton() {
    var resp = SSI_GetValue('[% QuestionName() %]_r8_other') != '';
    SSI_ToggleRadioButtonOrCheckbox('[% QuestionName() %]_r8_1', resp);
    $('#[% QuestionName() %]_r8_1_graphical').toggle(resp);
}

$(document).ready(disableOrEnableRadioButton);
$(document).on('keyup', '#[% QuestionName() %]_r8_other', disableOrEnableRadioButton);
</script>
answered Oct 22 by Zachary Platinum Sawtooth Software, Inc. (156,375 points)
...