Have an idea?

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

Other (Respondent Specify) box displayed only if option selected

Good afternoon, gentlemen, hope you are doing well.

Currently, I'm using Lighthouse Studio v9.3.1.

Usually, by default, in Select question types, the Respondent Specify list member keeps the text box displayed, regardless of being chosen or not.
Is there a way to display such text box (in Select type questions) only if this option is checked?

Thanks a lot for your time.

Best Regards,

Mauricio.
asked Apr 28, 2017 by Mauricio Belleza (430 points)
retagged Apr 28, 2017 by Walter Williams
Are you using a radio-type select question or a checkbox-type select question?
Hi, Zachary,

currently I'm using a checkbox-type select question.

Thanks a lot!

Best,

1 Answer

+1 vote
Place this code in your select question's footer:

<style>
#[% QuestionName() %]_div input[type="text"],
#[% QuestionName() %]_div textarea {
    display: none;
}
</style>

<script>
$(document).ready(function(){
    toggleOtherSpecifies();
})

function SSI_CustomGraphicalCheckbox() {
    toggleOtherSpecifies();
}

function toggleOtherSpecifies() {
    $('input[name="hid_list_[% QuestionName() %]"]').val().split(',').forEach(function(i){
        var resp = SSI_GetValue('[% QuestionName() %]_' + i);
        $('#[% QuestionName() %]_' + i + '_other').toggle(resp == 1);
    });
}
</script>
answered Apr 28, 2017 by Zachary Platinum Sawtooth Software, Inc. (67,750 points)
Thanks a lot, Zachary! It works perfectly.
Hi Zachary,

If it is a radio type or grid type, what is the solution. Can you please explain when it is a single grid column wise with multiple others and a single select radio type.

Thank you!
...