Have an idea?

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

Select Question (Multi punch) with Other specifies

Hello,

I have a select question with 11 list members, list member 8 through 11 are other specifies.  

I would like to prevent the respondent from typing in an other specify on the second other specify (list member 9) before they type in an other specify for list member 8 and so on.  

How can I hide/disable list member 9 - 11 and only have the list member appear if the prior list member has was checked?

Thank you in advance for your help
asked Mar 2, 2022 by Sandy

1 Answer

0 votes
Please try this script:

<script>
function SSI_CustomGraphicalCheckbox() {
    for (var i = 8; i <= 11; i++) {
        if (SSI_GetValue('[% QuestionName() %]_' + i)) {
            $('#[% QuestionName() %]_' + (i + 1)).closest('.clickable').show();
        }
        else {
            $('#[% QuestionName() %]_' + (i + 1)).closest('.clickable').hide();
            if (SSI_GetValue('[% QuestionName() %]_' + (i + 1))) {
                SSI_SetSelect('[% QuestionName() %]_' + (i + 1), false);
                $('#[% QuestionName() %]_' + (i + 1) + '_other').val('');
            }
        }
    }
}

$(document).ready(SSI_CustomGraphicalCheckbox);
</script>
answered Mar 2, 2022 by Zachary Platinum Sawtooth Software, Inc. (214,575 points)
Thank you!
...