I have a side by side table with a multichoice column. I’d like to make code 3 exclusive.
I’ve got the below which unchecks codes 1 and 2, if code 3 has been selected, but in order to select codes 1 or 2 again, I need to unselect code 3 first.
Also, below I’m relying on the other codes being less than code 3 i.e. codes 1 and 2 in this case - so if my exclusive code isn’t the last code, then I assume I’d need to do a gt line too.
Is there a less clunky way of doing this?
n.b. I have other sets of multichoice columns, so just want the below to target SBS2
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery('#'+this.questionId+' tbody tr.Choice').click(function(){
if(jQuery(this).find('td.SBS2:eq(2)').find('inputftype="checkbox"]').is(':checked'))
{
jQuery(this).find('td.SBS2:lt(2)').find('inputftype="checkbox"]').prop('checked',false)
}
});