Can you make answer exclusive using select box? | XM Community
Skip to main content

I’m using the select box format because there are over 400 response options and you can choose up to 3. I need to make ‘Prefer not to disclose’ exclusive but that doesn’t appear to be an option unless you chance it to a list. 

 

Does anyone know a way around this with JavaScript or any other options?

you can create one question with one option “Prefer not to disclose” on same page and that option will be multi select checkbox.

So based on checkbox click you can set the dropdown value as blank and using change event you can uncheck the checkbox.

generic code:
 

var checkbox = paste id of checkbox using inverted commas "#xyz"
var dropdown = paste id of select box using inverted commas "#abc"

jQuery(checkbox).click(function(){
if(jQuery(checkbox).is(":checked")){
jQuery(dropdown).val("");
}
});

jQuery(dropdown).change(function(){
jQuery(checkbox).prop("checked", false);
});

So both will become mutually exclusive to each other.


Leave a Reply