Have an idea?

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

Remove Check Boxes on MultiSelect Question

I am programming a multiselect question with various images as the items - is it possible to remove the check box on the left of each item and have respondents simply click images to select them and click again to remove them? Would need the selected images to have a box around them to signal that they were selected
asked Aug 18, 2020 by Liz

1 Answer

0 votes
Please try adding this script to your select question:

<style>
#[% QuestionName() %]_div .input_cell {
    display: none;
}

.selectedImg {
    border: 1px solid blue;
}
</style>

<script>
$(document).ready(SSI_CustomGraphicalCheckbox);
function SSI_CustomGraphicalCheckbox() {
    $('input[name="hid_list_[% QuestionName() %]"]').val().split(',').forEach(function(item){
        var id = '[% QuestionName() %]_' + item;
        $('#' + id).closest('.clickable').find('img').toggleClass('selectedImg', SSI_GetValue(id) == 1);
    })
}
</script>


Line 7 can be updated with the visual changes you want for selected images.
answered Aug 18, 2020 by Zachary Platinum Sawtooth Software, Inc. (171,950 points)
...