Have an idea?

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

Click on column labels instead of radio buttons.

I have a grid question that has one row and two columns.   I'd like to be able to get rid of the radio buttons and show only the column labels in the column header.  Then respondents  would be able to click directly on the column labels to choose their answer.

I'm using SSI Web 8.4.8.   Thanks!
asked Aug 6, 2019 by Q (270 points)

1 Answer

+1 vote
 
Best answer
Try adding this to your grid question:

<style>
#[% QuestionName() %]_div .inner_table > tbody > tr:last-child {
    display: none;
}

#[% QuestionName() %]_div .inner_table > tbody > tr:first-child > td:not(:first-child) {
    cursor: pointer;
}
</style>

<script>
$(document).on('click', '#[% QuestionName() %]_div .inner_table > tbody > tr:first-child > td:nth-child(2)', function(){
    SSI_SetSelect('[% QuestionName() %]_r1_1', true);
});

$(document).on('click', '#[% QuestionName() %]_div .inner_table > tbody > tr:first-child > td:nth-child(3)', function(){
    SSI_SetSelect('[% QuestionName() %]_r1_2', true);
});
</script>
answered Aug 6, 2019 by Zachary Platinum Sawtooth Software, Inc. (134,850 points)
selected Aug 6, 2019 by Q
Thank you Zachary!
...